CDATE(expression)

Returns the expression converted to a date data type (Date).


expressionThe expression to evaluate and convert to a date.

REMARKS
* This function refers to your local settings when converting to dates.
* The "expression" can be any valid date expression.
* If the expression passed to the function is outside the range of the data type being converted to, an error occurs.
* Date and time literals are recognised ??
* This function does not recognise the names for the days of the week.
* If the year is not specified in the date, then the current year is used.
* You should not use the CVDATE function.

Dim dtBirthday As Date 
Dim sDateTime As String
sDateTime = "01/071977 12:00:26"
dtBirthday = Cdate(sDateTime)

dtBirthday = #1/12/2004#
CDate(dtBirthday) = "12/01/2004"
dtBirthday = #12/1/2004#
CDate(dtBirthday) = "01/12/2004"

CDate(36114) = "15/11/1998"
CDate("4 Mar 2010") = "04/03/2010"

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top