Timestamp# - script and chart function
Timestamp#() evaluates an expression as a date and time value, in the timestamp format set in the data load script or the operating system, unless a format string is supplied.
Syntax:
timestamp#(text[, format])
Return data type: dual
Arguments:
Argument | Description |
---|---|
text |
The text string to be evaluated. |
format |
String describing the format of the text string to be evaluated. If omitted, the short date format, time format, and decimal separator set in the operating system is used. ISO 8601 is supported for timestamps. |
Example:
The following example uses the date format M/D/YYYY. The date format is specified in the SET DateFormat statement at the top of the data load script
Add this example script to your app and run it.
Load *,
Timestamp(Timestamp#(String)) as TS;
LOAD * INLINE [
String
2015-09-15T12:13:14
1952-10-16T13:14:00+0200
1109-03-01T14:15
];
If you create a table with String and TS as dimensions, the results are as follows:
String | TS |
---|---|
2015-09-15T12:13:14 | 9/15/2015 12:13:14 PM |
1952-10-16T13:14:00+0200 | 10/16/1952 11:14:00 AM |
1109-03-01T14:15 | 3/1/1109 2:15:00 PM |