This MSAccess tutorial explains how to use the Access CDate function with syntax and examples.
The Microsoft Access CDate function converts a value to a date.
The syntax for the CDate function in MS Access is:
CDate( expression )
The CDate function can be used in the following versions of Microsoft Access:
The CDate function can be used in VBA code in Microsoft Access.
Dim LstrDate As String Dim LDate As Date LstrDate = "Apr 6, 2003" LDate = CDate(LstrDate)
The function called "CDate" will convert any value to a date as long as the expression is a valid date.
In this example, the variable LDate would now contain the value 4/6/2003.
(scroll to see more)