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
 General SQL Server Forums
 New to SQL Server Programming
 Convert to Date

Author  Topic 

Vack
Aged Yak Warrior

530 Posts

Posted - 2012-06-05 : 14:11:46
How can I change this: 20120423

to: 04/23/2012 inside of a select statement?

select ???? as Date

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-05 : 14:16:34
You can do it in T-SQL via CONVERT and appropriate style, however you should do this in your presentation layer.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-06-05 : 14:46:17
quote:
Originally posted by Vack

How can I change this: 20120423

to: 04/23/2012 inside of a select statement?

select ???? as Date


where are you trying to display the data?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -