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: 
Nur_Hidayu
Partner - Contributor
Partner - Contributor

Freeze date

Hi,

how can i freeze date in the script rather than hardcoding it?


example,

this year is 2022, so i need o freeze date '31-12-2021' from last year and map it with the rest of 2022 data.

and if this year is 2023, so i need to freeze '31-12-2022' from last year.

how can i do this into my script?

Labels (3)
1 Reply
Or
MVP
MVP

What do you mean by "freeze" a date?

You can use makedate(Year(Today()),12,31) to create a date that matches December 31st of the current year, and use that in whatever context you want.