Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Serial Numbers
◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Serial Numbers
■ A serial number is a date/time code used by Visual Basic to represent
dates and times. The valid range for a serial number is -53,688 to 65,380.
This equates to the date range between January 1, 1753, and December 31,
2078, inclusive.
■ The valid range for serial numbers is not the same as the valid range
used when setting the current system date. See: ◄DATE$ Statement►
■ Specifying arguments that return a serial number outside the valid range
(-53,688 to 65,380) causes Visual Basic to generate the error message,
"Illegal function call."
■ Numbers to the left of the decimal point represent the date; numbers to
the right of the decimal point represent the time. For example:
Serial Number Date
═════════════ ═══════════════════════════════════════════════
20323.25 August 22, 1955 6:00 A.M.
20324.25 August 23, 1955 6:00 A.M.
367.5 January 1, 1901 12:00 P.M.
367.75 January 1, 1901 6:00 P.M.
■ A serial number with no fractional part represents a date only. A serial
number with only a fractional part represents a time only.
■ The date portion of the serial number (to the left of the decimal point)
can represent dates between January 1, 1753, and December 31, 2078. Dates
before December 30, 1899, are represented by negative numbers; dates after
December 30 are represented by positive numbers. For example:
Serial Number Date
═════════════ ═══════════════════════════════════════════════
-1 December 29, 1899
0 December 30, 1899
1 December 31, 1899
2 January 1, 1900
■ The time portion of the serial number (to the right of the decimal point)
can represent times between 0 (00:00:00 A.M.) and .99999 (11:59:59 P.M. or
23:59:59).
See: ◄Date and Time Command Summary►