tech on the net
Home About Us Feedback Site Map


Access Excel Word


SQL Oracle / PLSQL SQL Server MySQL MariaDB PostgreSQL

Web Development

HTML CSS Color Picker


C Language


ASCII Table Linux UNIX Java Clipart Joke of the Moment
Share this page:

MS Access: CDate Function

Learn 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 Microsoft Access CDate function is:

CDate( expression )

Parameters or Arguments

expression is the value to convert to a date.

Applies To

The CDate function can be used in the following versions of Microsoft Access:

Example (in VBA Code)

The CDate function can be used in VBA code in Microsoft Access. For example:

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.