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 2008 Forums
 Transact-SQL (2008)
 Change date order

Author  Topic 

taunt
Posting Yak Master

128 Posts

Posted - 2013-06-20 : 12:40:06
Hello I have a table "items" and I need to update the releasedate field to look like this 01/15/2010. Right now it looks like this 20100115. How can I update the date field to look the way it should. Should I used substing commands or is there something better.

Thanks

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2013-06-20 : 13:14:48
Is the date stored as a string?
SELECT CONVERT(VARCHAR(8), CONVERT(DATE, '01/15/2010', 101), 112)
Go to Top of Page
   

- Advertisement -