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 2005 Forums
 Transact-SQL (2005)
 SR - Date conversion issues

Author  Topic 

srucker
Starting Member

26 Posts

Posted - 2008-12-08 : 14:08:47
Hey experts I am having an issue w/ a date conversion and could use some guidance.

I have a datetime column which I am trying to convert from
yyyy-mm-dd hh:mm:ss.000
to
mm/dd/yyyy

I tried to convert to varchar as it gave me 'Jan 27 2006' however it is not going to work for what I need.

can you please explain how I can complete this data conversion?

Thanks ahead!

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-12-08 : 14:13:48
if you are returning this to some sort of frontend then use that application to format the date. Otherwise see CONVERT in books online: select convert(varchar, getdate(), 101)

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -