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 date format

Author  Topic 

BendJoe
Posting Yak Master

128 Posts

Posted - 2008-11-24 : 12:04:11
I have data saved in the datetime format in my table.
for eg:

11/10/2008 10:30:26 AM

I need this to be converted into November 10,2008.
How could this be done?
Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-24 : 12:07:05
This is a presentation issue and is best bealt with at your front end. And if you really want to do this in sql use CONVERT

SELECT CONVERT(varchar(30),datefield,107)
Go to Top of Page

BendJoe
Posting Yak Master

128 Posts

Posted - 2008-11-24 : 12:20:55
Thank You
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-24 : 12:24:59
welcome
Go to Top of Page

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2008-11-26 : 00:20:59
SELECT DATENAME(MM, datefield) + RIGHT(CONVERT(VARCHAR(12),datefield, 107), 9) AS [Month DD, YYYY]
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-11-26 : 01:52:13
quote:
Originally posted by BendJoe

I have data saved in the datetime format in my table.
for eg:

11/10/2008 10:30:26 AM

I need this to be converted into November 10,2008.
How could this be done?
Thanks


It depends on where you want to show data

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -