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.
Hi, Been working on this for a few days but now at the point need some fresh ideas on how to proceed!
1. Requirement: Calculate the total # of business days between two dates (inclusive of start date ) i.e. Total # of business days between Mon - Fri would be 5.
2. SET COMMANDS BUSDAYS = _MTWTF_ HDAY = FY09 (Have holiday file set up with the Federal Holidays for 2007 - 2010)
3. Problem: Using the function DATEDIF(from_date,to_date,'BD') returns 4 as the # of business days for a Monday-Friday time period.
Example:
DATEDIF(04/20/2009,04/24/2009,'BD') = 4. For my requirment I need to show 5 total business days.
4. Possible Solution: As a possible solution I modify the above funtion to read:
DATEDIF(04/20/2009,04/24/2009,'BD) +1 In this example the function returned: 5
5. Problem (cont). When executing using the following dates the function returns 6 Business days instead of 5 business days.
DATEIF(04/20/2009,04/25/2009)This message has been edited. Last edited by: Jeff_Rowland,
A date expression can consist of:
[a] A date constant enclosed in quotation marks. For example:
COMPUTE STARTDATE/MDYY = 'FEB 28 1999' ;
[b] A calculation that uses numeric operators, date functions, or date subroutines to return a date. For example:
DEFINE DELIVERY/MDY = SHIPDATE + 5 ;
[c] A calculation that uses numeric operators, date functions, or date subroutines to return an integer that represents the number of days, months, quarters, or years between two dates. For example:
COMPUTE TURNAROUND/I4 = MDY (ORDERDATE, SHIPDATE) ;
As I see it,
20091231
is an integer expression not involving Date fields or Date-valued functions, so it falls under [c], and should yield a date 20,091,231 days beyond the epoch date. (The fact that the implementation nonetheless treats it as a yyyymmdd date value, rather than assigning an absurd date well beyond year 9999, is no guarantee of future behavior.)
OTOH,
'20091231'
is a valid date constant (in the context of assignment to a /YYMD field) and falls under [a], so it's perfectly safe to use.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005