DATETONUMBER
Use DATETONUMBER to perform arithmetic on dates.
The DATETONUMBER function returns an integer that results from counting the number of days from December 31, 1864, to the specified date.
- Syntax:
- DATETONUMBER (single-date-expression)
- Meaning:
- DATETONUMBER (date_to_convert)
- Returns:
- A single integer
The DATETONUMBER function converts a date to an integer. The resulting integer represents the number of days since December 31, 1864, where using DATETONUMBER with a date of January 1, 1865 returns the integer value 1.
If the input argument is in error, the function returns the value "none".
If the date format specified by the input argument does not include century, the century is determined based on the Century map setting using the CCLookup parameter or the current century.
Examples
- DaysBetween = DATETONUMBER ( StopDate
) - DATETONUMBER ( StartDate )
This expression could be used in a map rule to produce a value for DaysBetween. It converts the StopDate and the StartDate to integers, then subtracts the resulting two integers, and returns the result as DaysBetween.
Related functions
- ADDDAYS
- NUMBERTODATE