Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Kevderbeste
Contributor
Contributor

How to work Date function without format parameters

I was creating a calendar in order to supply the missing dates in my dataset.

 

I completed the information with autogenerate consecutive number asignment to any date, however I was trying understand it how to work date function without format parameter.

EX: date(43452) returns 18/12/2018

How is possible this simples numbers can be converted in a correct date, just with this function. 

 

 

Labels (2)
1 Solution

Accepted Solutions
Nicole-Smith

The integer is based on the number of days since 1899-12-30:

date(0) 30/12/1899
date(1) 31/12/1899
date(2) 1/1/1900
date(3) 2/1/1900
date(43452) 18/12/2018

View solution in original post

2 Replies
Nicole-Smith

The integer is based on the number of days since 1899-12-30:

date(0) 30/12/1899
date(1) 31/12/1899
date(2) 1/1/1900
date(3) 2/1/1900
date(43452) 18/12/2018
Vegar
MVP
MVP

The default format of the date is set by the DateFormat variable, normally autogenerated in the beginning of the
Script.

Example of use
SET DateFormat='YYYY-MM-DD';