homepage Welcome to WebmasterWorld Guest from 54.161.192.61
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
MS SQL Server SQL For Converting Date to GMT Format
For HTTP Headers If-Modified-Since and Last-Modified
IanTurner

WebmasterWorld Administrator ianturner us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4291436 posted 11:44 am on Apr 3, 2011 (gmt 0)

SELECT Left(DateName(Weekday,getdate()),3) + ', ' + CONVERT(CHAR(20),getdate(),113) + ' GMT'

I hope this is useful to someone as I couldn't find it anywhere else on the net.

Output Format is
Sun, 03 Apr 2011 12:42:04 GMT

 

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4291436 posted 11:48 am on Apr 3, 2011 (gmt 0)

Note that GMT officially ceased to exist in 1972.

The base time zone for the planet is now UTC, which for most intents and purposes is numerically equivalent but is not at all the same thing.


The problem is that UK clocks show UTC+0000 in Winter and UTC+0100 in Summer. That is, while the UK uses a zone numerically equivalent to GMT in the Winter, UK clocks use a zone which is numerically equivalent to GMT+1 in Summer.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved