function cDate (expr as variant) as date function cvDate(expr as variant) as variant
cDate
returns a date and cvDate
returns a variant. Thus, the expression cvDate(null)
is valid while cDate(null)
raises run-time error 94: Invalid use of Null. dt
is a numeric type, it is interpreted (cast) as double
which represents (fractional) days since midnight 1899-12-30 (See here). dt
it is a string
, it is tried to be interpreted according to the locale currently in effect (which is not always possible).