DateSerial (function)

Syntax DateSerial (year,month,day)
Description Returns a Date variant representing the specified date.
Comments The DateSerial function takes the following parameters:
Parameter Description
Year Integer between 100 and 9999
Month Integer between 1 and 12
Day Integer between 1 and 31
Example This example converts a date to a real number representing the serial date in days since December 30, 1899 (which is day 0).
Sub Main()
  tdate# = DateSerial(1993,08,22)
  MsgBox "The DateSerial value for August 22, 1993, is: " & tdate#
End Sub
See Also DateValue (function); TimeSerial (function); TimeValue (function); CDate, CVDate (functions).