CitectVBA Programming Reference > Understanding CitectVBA Language Basics > Date and Time Handling > Date-values


A date-value in CitectVBA is a count of the number of days from December 30, 1899. December 31, 1899 has the date-value of 1, and the 1st January 1900 is 2. December 30, 1899 has the date value of zero. Negative date-values represent dates prior to December 30, 1899.

A date-value in CitectVBA can actually range from January 1, 0100, to December 31, 9999 inclusive, which is a integer value ranging from -657434 up to +2958465 respectively. Using values outside this range will cause compilererrors in CitectVBA.

The pre-defined CitectVBA Year, Month, and Day functions calculate and return the appropriate year, month or day value (as an integer) from a date-value.