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.
I'm having trouble finding the valid "components" to be used with HDIFF. I know that DATEDIF uses WD for weekday but is there an equivalent for HDIFF? I've tried WEEKDAY but it just returns zeros. DAY works correctly, but I need just the week days.This message has been edited. Last edited by: FP Mod Chuck,
Thanks but that isn’t what I’m asking. I want to know what component values can be used with hdiff. I need to know how many week days are between two days.
I have searched and searched before posting. As you can see in the link you gave me it does not state what the component values are for hdiff. I can’t find that in any of my searches and have tried every word I can think of for weekday. Datediff documentation says what the values are for that one. Not sure why this is so hard to find for hdiff.
The "component" parameter is used in other Date Time functions and can be found within the "Using Function / Date-Time Functions" section of the documentation - here.
Click the "Supplying Arguments for Date-Time Functions" link to locate the arguements that can be used.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
That's one of those cases where there is a lack of hyperlinks in the documentation. If you don't know where to look, the documentation can be a bit frustrating at times.
It also does not help that many of the links in the Index of the online documentation point to non-existent pages... It's all a bit broken as of late.
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 :
Not sure if this will help ... but here is an example using DATEDIF and the two date parameters are HDATE functions that convert your DateTime fields to Smart Date fields ...
DEFINE FILE CAR DATE1/HMDYYS = DT(01/08/2018 08:10:20); DATE2/HMDYYS = DT(01/15/2018 09:20:20); -* D_DIFF/I8 = DATEDIF(HDATE(DATE1, 'YYMD'), HDATE(DATE2, 'YYMD'), 'D'); WD_DIFF/I8 = DATEDIF(HDATE(DATE1, 'YYMD'), HDATE(DATE2, 'YYMD'), 'WD'); END -* TABLE FILE CAR PRINT COUNTRY NOPRINT DATE1 DATE2 D_DIFF WD_DIFF WHERE RECORDLIMIT EQ 1 END
WebFocus 8.201M, Windows, App Studio
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008
Well ... it doesn't appear to work the same. I'm seeing the same thing you are.
Here's an example ...
DEFINE FILE CAR DATE1/HMDYYS = DT(01/08/2018 08:10:20); DATE2/HMDYYS = DT(01/16/2018 09:20:20); -* D_HDIFF/D12.2 = HDIFF(DATE2, DATE1, 'DAY', 'D12.2'); WD_HDIFF/D12.2 = HDIFF(DATE2, DATE1, 'WEEKDAY', 'D12.2'); -* D_DATEDIF/I8 = DATEDIF(HDATE(DATE1, 'YYMD'), HDATE(DATE2, 'YYMD'), 'D'); WD_DATEDIF/I8 = DATEDIF(HDATE(DATE1, 'YYMD'), HDATE(DATE2, 'YYMD'), 'WD'); END -* TABLE FILE CAR PRINT COUNTRY NOPRINT DATE1 DATE2 D_HDIFF WD_HDIFF D_DATEDIF WD_DATEDIF WHERE RECORDLIMIT EQ 1 END
HDIFF and DATEDIF are different animals ... It looks like DATEDIF was built to handle the counting of only week days(WD) or business days(BD) where I'm not sure HDIFF has that capability.
Maybe someone else can explain this better.
WebFocus 8.201M, Windows, App Studio
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008
From the documentation of the new simplified DTDIFF function I don't see any support for calculating the difference between two date(time)s in working days. I guess the same applies for HDIFF.
I consider that an omission worth opening a case for.
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 :