Skip to main content Skip to complementary content

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.

The Timestamp# function supports many format options for different time structures, for example:

DD/MM/YYYY: Focuses on just the date (for example: 15/11/2024).

YYYY-MM-DD hh:mm:ss: ​Displays the full timestamp (for example: 2024-11-15 13:30:45).

​MMM DD, YYYY: ​Displays a short version of the month and the full year (for example: Nov 15, 2024).

hh:mm:ss TT: ​Shows only the time in 12-hour format (for example: 01:30:45 PM)

​HH:mm:ss: ​Displays time in 24-hour format (for example: 13:30:45)

​wwww, MMM DD YYYY: ​Shows full day of the week and date (for example: Friday, Nov 15 2024)

​YYYY-MM-DD hh:mm:ss.fff: ​Includes milliseconds (for example: 2024-11-15 13:30:45.123​).

Descriptions for number and time formats

Example: Chart expressions
Example Result
Timestamp#('12-03-2023 10:25:30', 'DD-MM-YYYY hh:mm:ss') Returns 12-03-2023 10:25:30
Timestamp#('2023/03/15 13:45', 'YYYY/MM/DD hh:mm') Returns 2023/03/15 13:45

Example - Timestamp# fundamentals

Example - Timestamp# scenario

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!