Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Black_Hole
Creator II
Creator II

Time function in a script

Hello all,

I put in my script the following expression

SET vPeriod= Year(Today())&Month(Today());

I am expecting to have the result : 202004

Please could you help me to confirm if this expression gives the result above or not.

 

Many thanks in advance for your help.

Have a nice day  !

Labels (4)
2 Solutions

Accepted Solutions
Frank_Hartmann
Master II
Master II

Year(Today())&num(Month(Today()),'00')

View solution in original post

tresesco
MVP
MVP

Change your SET to LET, and then try like:

LET vPeriod= Year(Today())*100 + Month(Today());

 

Or like string operation shown above by Frank

View solution in original post

3 Replies
Frank_Hartmann
Master II
Master II

Year(Today())&num(Month(Today()),'00')

tresesco
MVP
MVP

Change your SET to LET, and then try like:

LET vPeriod= Year(Today())*100 + Month(Today());

 

Or like string operation shown above by Frank

Black_Hole
Creator II
Creator II
Author

Hello @Frank_Hartmann , @tresesco ,

The expression works without any issue.

Thank you for your quick and effective solution. 👍