Page 1 of 1

Convert EST timestamp to GMT

Posted: Thu Mar 02, 2017 7:45 pm
by DSFreddie
Hi All,

Good evening.

Is there a function ( or set of functions) that can convert a timestamp value (which is in EST) to GMT timestamp value ? I am trying to convert a timestamp field coming from an input file & it goes to a output file. ( so running a Currentimestamp-current timezone in DB2(as it is our Database) is not a possibillity)

Thanks for your thoughts in advance.

Freddie

Posted: Fri Mar 03, 2017 6:33 am
by qt_ky
TimestampOffsetByComponents
Returns the given time stamp, with offsets applied from the given year offset, month offset, day offset, hour offset, minute offset, and second offset, each given as separate values. The seconds offset can include partial seconds.
- Parallel Job Developer's Guide

You supply the offset value(s)--positive or negative.

Posted: Fri Mar 03, 2017 7:53 am
by chulett
Failing that, your database is indeed a possibility. Load the file up into a "work" table and then use your DB function of choice when you extract it back out.

Posted: Mon Mar 06, 2017 2:49 am
by ray.wurlod
There are also web services out there that you can call, as yet another approach to solving this problem.