SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Change date order
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

taunt
Posting Yak Master

119 Posts

Posted - 06/20/2013 :  12:40:06  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

4614 Posts

Posted - 06/20/2013 :  13:14:48  Show Profile  Reply with Quote
Is the date stored as a string?
SELECT CONVERT(VARCHAR(8), CONVERT(DATE, '01/15/2010', 101), 112)
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000