MakeDateFromDayCount (open)
Creates a DateTime value from a total number of days
Syntax
LOADLIB "wh::datetime.whlib";
DATETIME FUNCTION MakeDateFromDayCount(INTEGER daycount)
Parameters
INTEGER daycount
The number of days since 01-01-0001 from which to create a DateTime value
Return value
DATETIME
A DateTime value on @italic daycount days since 01-01-0001 with time 00:00:00.
Description
This function creates a DateTime value from the number of days that have passed since 01-01-0001. The time of the returned value is 00:00:00.
Examples
// Creates a DateTime value representing yesterday
INTEGER today := GetDayCount(GetCurrentDateTime());
DATETIME yesterday := MakeDateFromDayCount(today - 1);