ToDateTime
This function converts data-type values to DateTime values.
The syntax is:
ToDateTimeD{<expression>,<culture code>}
Input arguments
Argument Name |
Data Type |
Description |
|
expression |
Integer |
I |
Expression to be converted |
String |
S |
||
Time |
T |
||
Currency |
C |
||
Decimal |
C |
||
Real |
R |
||
culture code (optional) |
Pick list value/ editable value |
This can be any valid SQL culture code. Default values include:
To use a culture code other than one of the defaults, click Custom and enter the culture code to use, such as "zh-CN". Note: the expression value must be in a format that matches the valid date format for the selected culture code. For example, if your expression value is 11/15/23 and the culture code is "fr", this will fail. The expression value must be a valid French date format, such as 15/11/23. |
Example
This example converts the Field1 value to date-time format. You can optionally provide a culture code to control the expected date format by locale.
ToDateTimeD{Field1S,en}
Result
Field1 | Results |
---|---|
2023-01-18 | 1/18/2023 12:00:00 AM |
2024-03-29 | 3/29/2024 12:00:00 AM |
2025-02-19 | 2/19/2025 12:00:00 AM |
Last modified: Monday October 28, 2024