The following example uses numeric expressions instead of absolute date numbers. Here the DateSerial
returns a date that is the day before the first day (1–1) of two months before August (8–2) of 10 years before 2015 (2015–10); in other words, May 31, 2005.
DateSerial(2015-10, 8-2, 1-1)
For the year argument, values in the range 0-99, inclusive, are interpreted as the years 1930–2029. For all other year arguments, use a complete 4-digit year (e.g. 1800).
When any argument exceeds the accepted Range for that argument, it increments to the next larger unit as appropriate. For example, if you specify 35 days, it is evaluated as one month and some number of days, depending on where in the year it is applied. However, if any single argument is outside the Range -32,768 to +32,767, or if the date specified by the three arguments, either directly or by expression, falls outside the acceptable Range of dates, an error occurs.