Welcome to WebmasterWorld Guest from 23.23.57.144

Forum Moderators: open

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)

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



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)

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



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.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month