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 2005 Forums
 Transact-SQL (2005)
 date format

Author  Topic 

collie
Constraint Violating Yak Guru

400 Posts

Posted - 2007-09-10 : 02:24:12
Hi,

I need to convert date into the format 12 September 2007. The formats i found such as 107 doesn't give the full name of the month but only the 1st 3 letters of the month and i need the full month name.

Is this possible?

Thanks

Whisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much.

PeterNeo
Constraint Violating Yak Guru

357 Posts

Posted - 2007-09-10 : 02:33:34
Hi Collie,

there is no style in sql 2005, u have to use datename and construct a string.
some thing like

select day(getdate()), datename(month, getdate()), year(getdate())
Go to Top of Page

collie
Constraint Violating Yak Guru

400 Posts

Posted - 2007-09-10 : 02:58:27
thanks for the reply. i will do what you suggested.

Whisky-my beloved dog who died suddenly on the 29/06/06-I miss u so much.
Go to Top of Page
   

- Advertisement -