Data Type: String or Numeric
Any valid date expression.
expression converted into a Date
expression to a Date type.
The format of
expression—the order of
day, month, and year—is determined by the locale setting of your
computer. To be certain of a date being recognized correctly by
CDate, the month, day, and year elements of
expression must be in the same sequence
as your computer’s regional settings; otherwise, the
CDate function has no idea that in the
expression “04/01/01,” 4 is supposed to
be the 4th of the month, not the month of April, for example.
CDate also converts numbers to a date.
The precise behavior of the function, however, depends on the value
expression is less than or
equal to 23 and includes a fractional component less than 60,
the integer is interpreted as the number of hours since
midnight, and the fraction is interpreted as the number of
In all other cases, the integer portion of
expression is converted to a date
that interprets the integer as the number of days before (in the
case of negative numbers) or after December 31, 1899, and its
fractional part is converted to the time of day, with every .01
representing 864 seconds (14 minutes 24 seconds) after
CDate accepts both numerical date expressions and string literals. You can pass month names into CDate in either complete or abbreviated form; for example, “31 ...