Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Time Calculations / TIMEADD?
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Time Calculations / TIMEADD?
 Login/Join
 
Expert
posted
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.
   Most recent: 8204 Gen 48 in Test and Production.
 
Posts: 3044 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
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,
 
Posts: 3044 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
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.
   Most recent: 8204 Gen 48 in Test and Production.
 
Posts: 3044 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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 :
 
Posts: 1651 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Time Calculations / TIMEADD?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.