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
 query for datetime format

Author  Topic 

vidhya
Posting Yak Master

108 Posts

Posted - 2008-06-30 : 07:14:56
hi friends,

I need to display todays date in this format
Monday, June 30, 2008

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-30 : 07:26:51
Try to do it in your front end application if possible.
else use

SELECT DATENAME(dw,GETDATE()) + ' ' + REPLACE(CONVERT(varchar(12),GETDATE(),107),LEFT(DATENAME(mm,GETDATE()),3),DATENAME(mm,GETDATE()))
Go to Top of Page

vidhya
Posting Yak Master

108 Posts

Posted - 2008-06-30 : 08:03:08
thanks visakh. Its working fine.
Go to Top of Page

raky
Aged Yak Warrior

767 Posts

Posted - 2008-06-30 : 09:41:38
quote:
Originally posted by vidhya

hi friends,

I need to display todays date in this format
Monday, June 30, 2008



SELECT DATENAME( DW,GETDATE())+', '+DATENAME(MONTH,GETDATE())+' '+CONVERT(CHAR(2),DATEPART(DD,GETDATE()))+', '+CONVERT(CHAR(4),YEAR(GETDATE()))
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-01 : 04:45:35
Also see this
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=105822
Go to Top of Page
   

- Advertisement -