lang • cdate

CDate

Date = CDate ( Expression AS Variant ) AS Date

Converts an expression (numerical Float or String) into a Date / Time.

Be careful! The current localization is not used by this function.

Errors

Message

Description
Type mismatch (6) Expression cannot be converted.

Examples

Print CDate("09/06/1972 01:45:12")
09/06/1972 01:45:12
Print CDate(2484515)
05/16/2002

See also