Focal Point
Difference between two dates

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6941065491

November 03, 2006, 11:34 AM
baxj89
Difference between two dates
I am trying to display the difference between two dates.
Example: 05/04/1994 from 11/03/2006(todays date) and display the total for each.

Years Months Days
Please Help


Developers Studio 7.6.5
November 03, 2006, 11:50 AM
Prarie
Look up the DATEDIF function....should be what you need.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
DATEDIF will do what you want of course you will have to additional calculations as it appears you want it broken down by years, months and days. Reminds me of an old COBOL program I used to have students do. Take the number of days assume a year is either 365, 366, or 365.25 days and go from there.


Leah
Can subtract dates (does not work with H formats)

DATE1/DMYY = ...
DATE2/DMYY = ...
DAYS/I6 = DATE1 - DATE2 ;

The advantage of this is that it will be translated to SQL for the interface you are using and may give you a big advantage.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo