Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help needed with date flag

Hi Community,

I am trying to create a date flag in script, it looked simple but somehow im not able to get it working as required. My date column is in the format 'MMM-YYYY'. what i want to acheive is that if the date has passed then the flag should be set to 0 else 1, but im unable to get it working.

Ive used an expression like below:

if(floor(num(MonthYr))<=floor(num(date#(today(),'MMM-YYYY'))), 0, 1) as MonthYr_Flag,

where the format of MonthYr is 'MMM-YYYY'.

Any help will be greatly appreciated.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

IF(Date#(MonthYr,'MMM-YYYY') <= Date(Today(),'MMM-YYYY'),0,1) as Flag

View solution in original post

2 Replies
MK_QSL
MVP
MVP

IF(Date#(MonthYr,'MMM-YYYY') <= Date(Today(),'MMM-YYYY'),0,1) as Flag

Not applicable
Author

Thanks Manish