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 don't think you can work with decimals and dates. What does 1.2 months mean? You could extract days or hours or smaller measures and do the division yourself...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Francis I agree with you that it does not mean to have month like 1.2, but this is our business requirement. We have to first calculate the month and then find out the average of all the records. If I am using DATEDIF function,the result deviated from its actual value.
Also I have thought of first finding the number of days and then dividing by 30.4, but its a kind of approximate method. If you find any solution please let me know.
You could base the decimal portion on a list of (days in months). and go from there.
(days in month list) = (1 31 2 28 3 31...) with an offset for leap year. Use (day of month) in you calculation with the associated days from your list...
I hope this helps.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
According to the documentation, using HDIFF requires using a D format (Floating Point Double Precision). All the examples show D12.2. However, it does not return fractions either. I asked IBI why have the 2 decimals if they are never used? They did not know so I put in a NFR. So that existing code would not be changed, I suggested using FDAY, FYEAR, etc. in the types for fractional days, years, etc.
It is in "Product Division" whatever that means. If you have a use for fractional date/time computations with DATEDIF or HDIFF, please do a NFR.This message has been edited. Last edited by: jgelona,
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
If you're coding a fractional month to a specific business requirement, then that business unit needs to provide you with their official calculation method.
It may be as simple as number of days divided by 30, it may be some strange arcane thing based on the phase of the moon. Regardless, that business unit calls the tune on their expected value. Contact them and ask for the official version. Without it you'll never clear their testing.
J.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007