DateTime datatype¶
Include: Built in; no package required.
DateTime stores a full date and time in the runtime Common Era calendar using datetime_t ticks.
Size¶
Runtime datetime_t storage.
Range¶
Valid non-null values run from -292276799-01-01 00:00:00.000 through 292277250-04-03.
Example¶
DateTime dtValue
Move 0 to dtValue
Notes¶
- Tick
0is the nullDateTimevalue. - One tick equals one millisecond.
- The minimum non-null tick is
1; the maximum tick is the maximum unsigned 64 bit tick value. - The calendar uses the Gregorian leap-year rule: a year is a leap year when
year % 4 == 0 && (year % 100 != 0 || year % 400 == 0). - The runtime supports BCE dates and year zero.
Now()is calculated from Unix time plus the Common Era offset.