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 Styles

Author  Topic 

kadrove
Starting Member

13 Posts

Posted - 2002-11-26 : 12:59:48
Help! I forgot my date styles (example: 101). Specifically, I'm looking to format 'mmddyy'. I'd also be grateful if someone could tell me where I could find a list. None of my books have it and I can't find it on Books Online.

Thanks!

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-11-26 : 13:19:50
Look in BOL under CONVERT. All the styles are listed.

Go to Top of Page

kadrove
Starting Member

13 Posts

Posted - 2002-11-26 : 13:35:08
Thanks!

It doesn't appear to have mine listed. How would I go about getting just mmddyy, without any characters in between?



Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-11-26 : 13:41:50
SELECT Replace(CONVERT(varchar(12), dateCol, 1), '/','')

Go to Top of Page

kadrove
Starting Member

13 Posts

Posted - 2002-11-26 : 13:46:48
It works!

Thank you!

Go to Top of Page
   

- Advertisement -