DateSerial() |
Top Previous Next |
DateSerial() - Create a Date Variable from Day, Month and Year Description The DateSerial() function creates a date variable from the supplied day, month and/or year parameters. Date = DateSerial(year, month, day) Parameters The month parameter should be a number or expression equalling between 1 and 12 inclusive. The day parameter should be a number or expression equalling between 1 and 31 inclusive. Example 'Create a date variable for April 1, 2001 MyDate = DateSerial(2001, 4, 1)
'Create a date three years prior MyDate = DateSerial(2001 - 3, 4, 1) |