Converts the value, specified as an argument, to a value of date type.
Copy Code |
---|
DateTime CDate ( |
A DateTime value.
Use the IsDate function to determine if value can be converted to a date. CDate recognizes date literals and time literals as well as some numbers that fall within the range of acceptable dates.
CDate recognizes date formats according to the locale setting of your system. The correct order of day, month, and year may not be determined if it is provided in a format other than one of the recognized date settings. In addition, a long date format is not recognized if it also contains the day-of-the-week string.
Conversion Functions
Date & Time Functions
DateAdd Function
DatePart Function