TODATE Function

Converts the argument to a date value based on the locale settings on your system.

Category: String
Interaction: The TODATE( ) function depends on the default Short date regional setting on your Microsoft Windows environment. You can change the locale setting on Windows.
Returned data type: Date

Syntax

TODATE(any)

Required Argument

any

specifies a value to convert to a date.

Details

When the TODATE( ) function is evaluated, the value of the Windows Short date locale field is examined to determine whether the format is MM/DD/YYYY or DD/MM/YYYY. The order of the month and date is determined by the Short date value.

Example

// Declare the date variable to contain the date value
date dateval
 
// Use the TODATE function to populate the date variable
dateval=todate(3750)
 
// Returns the value:
4/7/10 12:00:00 AM