Re: Converting dates to UTC?
Date: 1996/09/18
Message-ID: <51o6no$lmj_at_ramona.sfo.com>#1/1
: Is there any way in oracle SQL or PL/SQL to convert date
: values to Greenwich Mean Time, aka, Universal Standard Time?
Yah, mean you don't store your datetime fields as GMT. Good god sir, the time meridian runs through Greenwich and you choose to use another time zone !!!
Oracle's implementation of SQL gives you the ability to translate to/from any timezone that you please - easiest method being to add/subtract a GMT offest (ie 'SELECT sysdate + <GMT OFFSET>. FROM dual' will give you the date/time that your require).
The trick therefore is to determine the GMT offset. This is usually system/ platform dependant, but id generally trivial to inplement (apologies for the mis-spellings, but I yawned and that's what happened).
To be honest, I have never worked out a fully portable solution across all platforms and would be more than interested in a fool-proof SQL-based solution.
IAP Received on Wed Sep 18 1996 - 00:00:00 CEST