Format the date


hi,

i need format date following format:

wed, 02 oct 2011 08:00:00 gtm

i need rssfeed

thanks

i agree erland that formatting better suited client side processing.  if the datetime known utc (a.k.a. gmt, not gtm), can hard-code timezone:

  select  	cast(datename(dw, getutcdate()) as char(3))  	+ ', ' + cast(datepart(dd, getutcdate()) as char(2))  	+ ' ' + cast(datename(month, getutcdate()) as char(3))  	+ ' ' + cast(datepart(yyyy, getutcdate()) as char(4))  	+ ' ' + convert(char(8), getutcdate(), 108)  	+ ' gmt';  

 


dan guzman, sql server mvp, http://weblogs.sqlteam.com/dang/


SQL Server  >  Transact-SQL



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........