How to: |
The DA functions convert a legacy date to the number of days between a specific day in the past, called 'base date', and a specified date. By converting a date to the number of days, you can subtract dates and calculate the intervals between them, or you can add to or subtract numbers from the dates to get new dates.
You can convert the result of a DA function back to a legacy date using the DT functions.
function(indate, output_format)
where:
Is one of the following:
I6xxx, where xxx corresponds to the function DAxxx in the list above.
Is the legacy date to be converted. If indate is a numeric literal, enter only the last two digits of the year; the function assumes the century component. If the date is invalid, the function returns a 0.
Integer
DAYMD converts DAT_INC and HIRE_DATE to the number of days since December 31, 1899 and the smaller number is then subtracted from the larger number:
DAYMD(DAT_INC, 'I8') - DAYMD(HIRE_DATE, 'I8')
iWay Software |