Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Date Format

Author  Topic 

real_pearl
Posting Yak Master

106 Posts

Posted - 2004-06-09 : 03:21:42
I want to set the date format to mdy
But when I set the date format in Query Analyzer it displays in the format 2004-06-09 00:00:00.000. Please tell me why it is happening. Also if I want to display my datetime column in the format of long date then what I'll have to do e.g.,

Wednesday, June 09, 2004

gpl
Posting Yak Master

195 Posts

Posted - 2004-06-09 : 04:34:38
QA shows datetime values in the simplest way that doesnt cause confusion (ie the way dd/mm/yy or mm/dd/yy could)
If you want to show it in another format, you will have to convert it to a char/varchar with the appropriate format identifier - see BOL for these values under CONVERT.
Graham
Go to Top of Page
   

- Advertisement -