ToDate Function
The ToDate function converts an expression to a Date value.
Syntax 1
ToDate(year)
The ToDate function converts an expression to a Date value.
Arguments
year
Integer - An integer or integer expression representing the year.
Syntax 2
ToDate(expression)
The ToDate function converts an expression to a Date value.
Arguments
expression
Expression - The expression to convert, either by evaluating to a number or a date in string format.
Syntax 3
ToDate(year, month)
The ToDate function converts an expression to a Date value.
Arguments
year
Integer - An integer or integer expression representing the year.
month
Integer - An integer or integer expression representing the month, in the range 1-12.
Syntax 4
ToDate(expression, month)
The ToDate function converts an expression to a Date value.
Arguments
expression
Expression - The expression to convert, either by evaluating to a number or a date in string format.
month
Integer - An integer or integer expression representing the month, in the range 1-12.
Syntax 5
ToDate(year, month, day)
The ToDate function converts an expression to a Date value. |
Arguments
year
Integer - An integer or integer expression representing the year.
month
Integer - An integer or integer expression representing the month, in the range 1-12.
day
Integer - An integer or integer expression representing the day, in the range 1-31.
Syntax 6
ToDate(expression, month, day)
The ToDate function converts an expression to a Date value.
Arguments
expression
Expression - The expression to convert, either by evaluating to a number or a date in string format.
month
Integer - An integer or integer expression representing the month, in the range 1-12.
day
Integer - An integer or integer expression representing the day, in the range 1-31.
Remarks
Example:
ToDate("2005/1/1"); // returns 1/1/2005
Example:
ToDate(2005, 1, 28); // returns 1/28/2005