Returns a date given a year, month, and day.

      DateSerial(year, month, day)

   year   Integer. Number between 100 and 9999, inclusive, or a numeric expression.
month Integer. Any numeric expression.
day Integer. Any numeric expression.

The interpretation of two-digit years will vary according to the versions of Windows. To be sure the function returns the proper value, use a four-digit year.

The DateSerial() function can be used in VBA or in an SQL query.


Dim dtmArrival As Date

dtmArrival = DateSerial (2012, 12, 31)

'in SQL:
Expr1:DateSerial (2012, 12, 31)

“If you are planning for a year, sow rice; if you are planning for a decade, plant trees; if you are planning for a lifetime, educate people” ~ Chinese Proverb


Date - Return the current date.
DateAdd - Add a time interval to a date.
- Return the time difference between two dates.

© Copyright 1999-2016
Some rights reserved