DateValue()

Top  Previous  Next

DateValue() - Create a Date from a Formatted Date String

Description

The DateValue() creates a date variable from the supplied formatted date (and/or time) string.

NOTE: Use the CDate() Function Instead

 

Date = DateValue(date)

Example

'Create a date variable for 1-Apr-64

 

MyDate = DateValue("April 1, 1964")

MyDate = DateValue("1-Apr-64")