Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
aritting
Creator
Creator

I need a Date Time Function to create a Integer Date in format YYYYMMDD?

I want to convert the current date to an integer value in the format YYYYMMDD.

For example, Today is 12/09/2016 in MM/DD/YYYY format and converted to YYYYMMDD is 20161209.

I would be using the today() or now() function as the source of the date.

Can any provide an example in how to do this in Qlik script?

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

This is still date, but in the required format

LOAD Date(Today(), 'YYYYMMDD') as Date

or

This is a number now

Num#(Date(Today(), 'YYYYMMDD'), '##') as DateNumber

View solution in original post

3 Replies
sunny_talwar

May be like this:

This is still date, but in the required format

LOAD Date(Today(), 'YYYYMMDD') as Date

or

This is a number now

Num#(Date(Today(), 'YYYYMMDD'), '##') as DateNumber

aritting
Creator
Creator
Author

yes, that works in a Load statement and expression

Num#(Date(Today(), 'YYYYMMDD'), '##') as DateNumber

or

LET vL.MyVar = Num#(Date(Today(), 'YYYYMMDD'), '##');

aritting
Creator
Creator
Author

Thank you very much!