Skip to content

DateValue - Built-in Date & Time Function

Purpose

DateValue returns a date from the specified expression.

Syntax

DateValue(exp)

Arguments

Argument Required Description
exp Yes Any valid string expression containing the datetime

Returns

Date

See also

Example

// returns a date parsed using the Windows regional settings, 
// - for the USA the value would be; Wednesday, June 04, 2014, 12:00:00 AM
// - for the Netherlands the value would be: Zondag, April, 06, 2014, 00:00:00
Return DateValue("06/04/2014")
// returns the date of now, so current date.
// The result is identical to Date()
Return DateValue(Now())

Notes

  • When the exp cannot be converted to a datetime value, a runtime error is generated.
  • DateValue uses the locale settings to determine the date.
  • DateValue returns a date with the time portion set to midnight.