Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | 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
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

taunt
Posting Yak Master

128 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  
 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.08 seconds. Powered By: Snitz Forums 2000