Skip to main content

Date - script and chart function

Date() formats an expression as a date using the format set in the system variables in the load script, or the operating system, or a format string, if supplied.


Date(number[, format])

Return data type: dual


Date arguments
Argument Description
number The number to be formatted.
format String describing the format of the resulting string. If no format string is supplied, the date format set in the operating system is used.


The examples below assume the following default settings:

  • Date setting 1: YY-MM-DD
  • Date setting 2: M/D/YY

Example 1:  

Date( A )

where A=35648

Example 1 results
Results Setting 1 Setting 2
String: 97-08-06 8/6/97
Number: 35648 35648

Example 2:  

Date( A, 'YY.MM.DD' )

where A=35648

Example 2 results
Results Setting 1 Setting 2
String: 97.08.06 97.08.06
Number: 35648 35648

Example 3:  

Date( A, 'DD.MM.YYYY' )

where A=35648.375

Example 3 results
Results Setting 1 Setting 2
String: 06.08.1997 06.08.1997
Number: 35648.375 35648.375

Example 4:  

Date( A, 'YY.MM.DD' )

where A=8/6/97

Example 4 results
Results Setting 1 Setting 2
String: NULL (nothing) 97.08.06
Number: NULL 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: