December 12, 2002 at 8:55 am
How do I determine what time zone I am in using TSQL?
CDT, CST, PDT, PST, etc...
December 12, 2002 at 10:09 am
It appears that all the date functions are referencing what the server setting is for Time Zone.
Hope this helps.
David
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
December 12, 2002 at 10:31 am
David, I guess I don't follow what you are stating. When I look at the date and time functions in TSQL it doesn't appear that they have any reference to Time Zones. Could you please elaborate?
Thanks
December 12, 2002 at 10:32 am
David, I guess I don't follow what you are stating. When I look at the date and time functions in TSQL it doesn't appear that they have any reference to Time Zones. Could you please elaborate?
Thanks
December 12, 2002 at 11:34 am
Sorry, didn't read fully. You will first need to know the difference between your time and Greenwich Mean Time. EST is -5. Once you have that you can compare using the following;
select datediff(hour, getutcdate(), getdate())
Hope this helps get you closer and sorry I wasn't more specific in the last post.
David
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply