# 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:

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<br>is used. ISO 8601 is supported for timestamps.<br><br>[Descriptions for number and time formats](https://help.qlik.com/en-US/sense/May2025/Subsystems/Hub/Content/Sense_Hub/Introduction/conventions-number-time-formats.htm) |

Example: Chart expressions

| Example | Result |
| --- | --- |
| `Timestamp(Timestamp#('2015-09-15T12:13:14'))` | Returns `9/15/2015 12:13:14 PM` |
| `Timestamp(Timestamp#('1952-10-16T13:14:00+0200'))` | Returns `10/16/1952 11:14:00 AM` |
| `Timestamp(Timestamp#('1109-03-01T14:15	'))` | Returns `3/1/1109 2:15:00 PM` |

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:

Results

| 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 |