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