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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| ||||
| 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 > |