Click here to Skip to main content
15,895,011 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to connect PROGRESS databse? Pin
Kschuler9-Apr-08 10:53
Kschuler9-Apr-08 10:53 
Generalinsert into oracle table from mssql server table Pin
acodman9-Apr-08 2:48
acodman9-Apr-08 2:48 
GeneralRe: insert into oracle table from mssql server table Pin
Mycroft Holmes10-Apr-08 20:40
professionalMycroft Holmes10-Apr-08 20:40 
Questionmaximum of 2 datetime across 2 columns in sql Pin
amitcoder839-Apr-08 2:37
amitcoder839-Apr-08 2:37 
GeneralRe: maximum of 2 datetime across 2 columns in sql Pin
Mark J. Miller9-Apr-08 3:59
Mark J. Miller9-Apr-08 3:59 
GeneralRe: maximum of 2 datetime across 2 columns in sql Pin
amitcoder839-Apr-08 21:53
amitcoder839-Apr-08 21:53 
Questionsmalldatetime and data; how to get them to cooperate!? Pin
Daniel_Logan9-Apr-08 2:37
Daniel_Logan9-Apr-08 2:37 
AnswerRe: smalldatetime and data; how to get them to cooperate!? Pin
Mark J. Miller9-Apr-08 4:11
Mark J. Miller9-Apr-08 4:11 
DATETIME and SMALLDATETIME fields will always have the same format. You need to convert it to a string and specify the output format you would like to use. The method for doing this will depend on the language you are using but any language should have a method for formatting date/time strings.

If you are using .NET for your web pages the DateTime class has overloaded ToString() methods for formatting the string. If you want the output of your SQL query to be formatted then use the CONVERT function:

.NET (c#)
<br />
myDateObject.ToString("yyyy/dd/MM");<br />


T-SQL
<br />
SELECT REPLACE(SUBSTRING(CONVERT(VARCHAR, GETDATE(), 120), 1, 10), '-', '/') AS Date<br />


T-SQL is less flexible, so you either need to concatenate calls to DATEPART (or YEAR, MONTH, DAY) or do something like the example above (SUBSTRING and REPLACE along with the 'style' argument of the CONVERT function).


GeneralRe: smalldatetime and data; how to get them to cooperate!? Pin
Daniel_Logan9-Apr-08 4:21
Daniel_Logan9-Apr-08 4:21 
AnswerRe: smalldatetime and data; how to get them to cooperate!? Pin
Ashfield9-Apr-08 21:37
Ashfield9-Apr-08 21:37 
GeneralRe: smalldatetime and data; how to get them to cooperate!? Pin
Daniel_Logan9-Apr-08 22:05
Daniel_Logan9-Apr-08 22:05 
GeneralRe: smalldatetime and data; how to get them to cooperate!? Pin
Ashfield10-Apr-08 1:44
Ashfield10-Apr-08 1:44 
GeneralRe: smalldatetime and data; how to get them to cooperate!? Pin
Daniel_Logan10-Apr-08 4:02
Daniel_Logan10-Apr-08 4:02 
QuestionUrgent:Data Purging of previous month Pin
rockz...9-Apr-08 1:17
rockz...9-Apr-08 1:17 
GeneralRe: Urgent:Data Purging of previous month Pin
Ashfield9-Apr-08 1:43
Ashfield9-Apr-08 1:43 
GeneralRe: Urgent:Data Purging of previous month Pin
Christian Graus9-Apr-08 2:15
protectorChristian Graus9-Apr-08 2:15 
GeneralDTS error display Pin
Amit Baheti9-Apr-08 1:10
Amit Baheti9-Apr-08 1:10 
GeneralRe: DTS error display Pin
SimulationofSai9-Apr-08 7:59
SimulationofSai9-Apr-08 7:59 
QuestionMerging row data Pin
siddy178-Apr-08 23:57
siddy178-Apr-08 23:57 
GeneralRe: Merging row data Pin
Mark J. Miller9-Apr-08 4:30
Mark J. Miller9-Apr-08 4:30 
Questionhow to know whether the string is having to_char or not in oracle Pin
lakshmichawala8-Apr-08 21:20
lakshmichawala8-Apr-08 21:20 
GeneralMy query does not have an error but returns no value Pin
Daniel_Logan8-Apr-08 21:04
Daniel_Logan8-Apr-08 21:04 
GeneralRe: My query does not have an error but returns no value Pin
Christian Graus8-Apr-08 21:27
protectorChristian Graus8-Apr-08 21:27 
GeneralRe: My query does not have an error but returns no value Pin
Daniel_Logan8-Apr-08 22:33
Daniel_Logan8-Apr-08 22:33 
GeneralRe: My query does not have an error but returns no value Pin
Ashfield9-Apr-08 1:45
Ashfield9-Apr-08 1:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.