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
 SQL Server Development (2000)
 Getting a part of a DateTime

Author  Topic 

mikebird
Aged Yak Warrior

529 Posts

Posted - 2009-03-30 : 07:55:22

I use left(datetime_column, 11) to cut the time part out all the time

Today I see Jan 2 2009

instead of the 2009-01-02 I want

Original data is 2009-01-02 00:00:00

How do I do it? I suspect something may have changed from 2005 to 2008?

Tried cast and convert and combos of all three functions here. No solutions here. Is there a option in the database config, or even in the SSMS editor display window?

Thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-03-30 : 07:58:29
Use CONVERT with style 120.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -