Unix Technical Forum

SQL 2000 - convert local time to GMT

This is a discussion on SQL 2000 - convert local time to GMT within the SQL Server Data Warehousing forums, part of the Microsoft SQL Server category; --> I'm working with SQL 2000. The database server is located in the Pacific Time zone. Data will to be ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server Data Warehousing

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 06:15 PM
apm
 
Posts: n/a
Default SQL 2000 - convert local time to GMT

I'm working with SQL 2000. The database server is located
in the Pacific Time zone. Data will to be collected from
other time zones (CT, MT, ET, etc.). Is there a stored
procedure that can convert the time stamp on the data
retrieved from the time zones into GMT?

Thank you in advance.

- apm

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 06:15 PM
Jacco Schalkwijk
 
Posts: n/a
Default Re: SQL 2000 - convert local time to GMT

It depends how your data is collected. If you timestamp your data (for
example with a create date column with a default) when they are entered in
SQL Server you can use the GETUTCDATE() function instead of GETDATE(), but
if the data is timestamped in your client application you either have to
convert the datetime to GMT in the client application or send the local
datetime plus the timezone to the server, but that is more complicated than
using GETUTCDATE().

--
Jacco Schalkwijk
SQL Server MVP


"apm" <anonymous@discussions.microsoft.com> wrote in message
news:068d01c39512$23bcedc0$a101280a@phx.gbl...
> I'm working with SQL 2000. The database server is located
> in the Pacific Time zone. Data will to be collected from
> other time zones (CT, MT, ET, etc.). Is there a stored
> procedure that can convert the time stamp on the data
> retrieved from the time zones into GMT?
>
> Thank you in advance.
>
> - apm
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:09 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com