Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Holiday / Business day processing that includes time?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Holiday / Business day processing that includes time?
 Login/Join
 
Member
posted
Hello all,
We are producing a report based on a agency rule of "elasped 72 hours". The 72 hour span does not include non-business days. Using a Holiday file I have code that correctly sets the start and end day -

NEW_DATE/YYMD = HDATE(RPT_RECV_DT, 'YYMD');
NEW_DATE_BD/YYMD = DATEADD(NEW_DATE, 'BD', 0);
END_DATE_BD_PLUS3/YYMD = DATEADD(NEW_DATE_BD, 'BD', 3);

- but I have to first remove and then "re-attach" the time. In searching documentation and Focal Point I did not see a way around this - is there a version of DATEADD for Business day (BD) that can include time and I just missed it?

(Please be kind if this has been addressed in Focal Point and I missed finding it...)

This message has been edited. Last edited by: <Kathryn Henning>,


Production: WebFocus 8.0.09 Test: WebFocus 8.0.09 Windows, Z-Linux, and ZOS.
all output
Focus - 7.2.7
 
Posts: 12 | Registered: July 21, 2010Report This Post
Virtuoso
posted Hide Post
There isn't a version of DATEADD for business day for date time fields. This means getting the time components, converting the datetime field to a date, using DATEADD which will work on business days and holiday files, convert back to a datetime, and set the time components back in.
HOURS/I2 = HPART(RPT_RECV_DT, 'hh', 'I2');
MINUTES/I2 = HPART(RPT_RECV_DT, 'mi', 'I2');
SECONDS/I2 = HPART(RPT_RECV_DT, 'ss', 'I2');
NEW_DATE_BD/HYYMDS       = HSETPT(HSETPT(HSETPT(HDTTM(DATEADD(HDATE(RPT_RECV_DT,'YYMD'),'BD',0),8,'HYYMDS'),'hh',HOURS,8,'HYYMDS'),'mi',MINUTES,8,'HYYMDS'),'ss',SECONDS,8,'HYYMDS');
END_DATE_BD_PLUS3/HYYMDS = HSETPT(HSETPT(HSETPT(HDTTM(DATEADD(HDATE(RPT_RECV_DT,'YYMD'),'BD',3),8,'HYYMDS'),'hh',HOURS,8,'HYYMDS'),'mi',MINUTES,8,'HYYMDS'),'ss',SECONDS,8,'HYYMDS'); 


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Holiday / Business day processing that includes time?

Copyright © 1996-2020 Information Builders