PUBLIC INTEGER FUNCTION GetDayCount (DATETIME date)
Description
GetDayCount() returns the number of days that have passed since 01-01-0001 until date, /> starting at 1 for 01-01-0001. The function cannot return a negative value.
This function is in essence the same as MakeDayCount(), except that GetDayCount() uses a parameter of type DateTime, whereas MakeDayCount() uses three integers for year, month and day.
Parameters
date
The end date
Returns
The number of days that have passed since 01-01-0001 until date. Value 1 represents 01-01-0001.
Example
// Returns the number of days passed since 01-01-0001 until today
INTEGER NumberOfDays := GetDayCount(GetCurrentDateTime());