Skip to main content

Timestamp - script and chart function

TimeStamp() formats an expression as a date and time value, in the timestamp format set in the system variables in the load script, or in the operating system, unless a format string is supplied.

Syntax:  

Timestamp(number[, format])

Return data type: dual

Arguments:  

Timestamp arguments
Argument Description
number The number to be formatted.
format String describing how the resulting timestamp string is to be formatted. If omitted, the short date format, time format, and decimal separator set in the operating system is used.

Examples:  

The examples below assume the following default settings:

  • TimeStampFormat setting 1: YY-MM-DD hh:mm:ss
  • TimeStampFormat setting 2: M/D/YY hh:mm:ss

Example 1:  

Timestamp( A )
where A=35648.375

Example 1 results
Results Setting 1 Setting 2
String:

97-08-06 09:00:00

8/6/97 09:00:00

Number:

35648.375

35648.375

Example 2:  

Timestamp( A,'YYYY-MM-DD hh.mm')
where A=35648

Example 2 results
Results Setting 1 Setting 2
String:

1997-08-06 00.00

1997-08-06 00.00

Number:

35648

35648

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!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com