integer values over 30000 are displayed as both number and date
➢December 30, 1899, is date 0 (zero) and dates are counted from that day on, meaning that, for example, January 1, 2020, is date 43831.
Although it makes no difference to actual calculations, when an integer's value is displayed in the macros debugger, it is displayed as a simple integer if its value is less than 30000, and as both a number and the corresponding date for any integer value above 30000, as shown in the example on the right.
The fact that integers and dates are the same, means that the following code, mixing dates and integers, is valid (since they are the same).
nTomorrow = Today() + 1
nAge = (Today() - nBirthDate) div 365
See also: type conversion.
Topic 135000, last updated on 18-Apr-2020