Focal Point
[SOLVED] Time Calculations / TIMEADD?

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4011008992

September 18, 2008, 04:50 PM
Doug
[SOLVED] Time Calculations / TIMEADD?
I cannot find anything significant here, on the WFF, regarding a remedy for my current time calculation requirement. I can do this one, albeit laboriously, in DM. However, I would like something, as least, as elegant (?) as DATEADD while keeping it within WebFOCUS - no Javascripting please. The immediate need is to convert the timestamp from GMT to EST (5 hour change so the DATEADD won't work). The replies to this post may be of benefit to some other “time clock” functions which I have in mind as well as this immediate case.

Thanks, in advance for any solutions.
c/o Nationwide Insurance

This message was previously edited by: Kerry, October 06, 2008 02:09 PM

This message has been edited. Last edited by: Doug,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
September 18, 2008, 04:58 PM
Darin Lee
Have you looked at the HADD function used for incrementing a Date-time value? I believe 'hour' is one of the components that can be incremented, so that should do the trick.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
September 18, 2008, 05:06 PM
Doug
Thanks a Gig Darin... I forgot all about that one... HADD did the trick, as follows:

ASSIGNED_EST/HYYMDS = HADD(ASSIGNED_GMT,'hh',-5, 8, ASSIGNED_EST);

This message has been edited. Last edited by: Doug,
December 15, 2017, 09:48 AM
Doug
quote:
Originally posted by Doug:
I cannot find anything significant here, on the WFF, regarding a remedy for my current time calculation requirement. I can do this one, albeit laboriously, in DM. However, I would like something, as least, as elegant (?) as DATEADD while keeping it within WebFOCUS - no Javascripting please. The immediate need is to convert the timestamp from GMT to EST (5 hour change so the DATEADD won't work). The replies to this post may be of benefit to some other “time clock” functions which I have in mind as well as this immediate case.

Thanks, in advance for any solutions.
c/o Nationwide Insurance

This message was previously edited by: Kerry, October 06, 2008 02:09 PM




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
December 15, 2017, 11:12 AM
Wep5622
I hope you don't have to take DST changes into account then?

GMT doesn't do DST (same as UTC), but I suspect local time (currently EST in your case) may throw a spanner in the wheels there...

That said, I think the HGETZ function is relatively new, but that returns the current date-time in UTC. In combination with HGETC and HDIFF, that should at least give you your current DST offset in hours.

That won't necessarily help you for an arbitrary date-time though.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :