I can't seem to find an answer to this in the forums, but I'm sure someone must have run into this issue before.
In an Enterprise job, I need to subtract a given number (the UTC/GMT offset) from a timestamp field, and return the new timestamp.
It doesn't appear to me that any of the built-in functions would do this, so does anyone have any suggestions on how to accomplish it?
Thanks for your help.
Tom
Adjusting date for UTC offset
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Since this is a time- (date-) variant quantity, I'd recommend calculating the hours separately from the job and passing it as a job parameter value. Perhaps you could interrogate the TZ environment variable.
Even better would be to have a daylight saving flag in a time dimension table, or in a related table. A great example for a range lookup.
Even better would be to have a daylight saving flag in a time dimension table, or in a related table. A great example for a range lookup.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.