Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

MS SQL Server SQL For Converting Date to GMT Format

For HTTP Headers If-Modified-Since and Last-Modified

11:44 am on Apr 3, 2011 (gmt 0)

Moderator from GB 

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

joined:July 19, 2001
posts: 3483
votes: 23

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
11:48 am on Apr 3, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
votes: 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.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members