|
How to: |
The DATEDIF function returns the difference between two full component standard dates in units of a specified component. A component is one of the following:
If one or both of the input dates is the end of the month, DATEDIF takes this into account. This means that the difference between January 31 and April 30 is three months, not two months.
DATEDIF returns a whole number. If the difference between two dates is not a whole number, DATEDIF truncates the value to the next largest integer. For example, the number of years between March 2, 2001, and March 1, 2002, is zero. If the end date is before the start date, DATEDIF returns a negative number.
Since Dialogue Manager interprets a date as alphanumeric or numeric, and DATEDIF requires a standard date stored as an offset from the base date, do not use DATEDIF with Dialogue Manager unless you first convert the variable used as the input date to an offset from the base date.
where:
Date
Is the start date from which to calculate the difference. Is a full component date.
Date
Is the end date from which to calculate the difference.
Alphanumeric
Is one of the following enclosed in single quotation marks:
Y indicates a year unit.
M indicates a month unit.
D indicates a day unit.
WD indicates a weekday unit.
BD indicates a business day unit.
Note: DATEDIF does not use an output argument because for the result it uses the format 'I8'.
| WebFOCUS | |
|
Feedback |