Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Measure date variable within the script

Dear guru's

I have a problem within the script to compare a date to a variable. I can only get the proper result while using a hard coded date, which is not an option. please advice.



SET

DateFormat='DD-MM-YYYY';

Let

Vandaag=Date(Today(), 'DD-MM-YYYY');









BedrijfOpzeg:



Load

if

(date([BedrijfLidm Einddat], 'DD-MM-YYYY') < '02-12-2009', 1, 0) as KEY_BedrOpgezegd

// if(date([BedrijfLidm Einddat], 'DD-MM-YYYY') < $(Vandaag), 1, 0) as KEY_BedrOpgezegd

resident BedrijfCommunity; BedrijfLidNummer,







1 Solution

Accepted Solutions
Not applicable
Author

Hi FJPOS,

try this:



SET DateFormat
='DD-MM-YYYY';

LET Vandaag=Date(Today(), 'DD-MM-YYYY');
BedrijfOpzeg:


LOAD

IF(
date([BedrijfLidm Einddat], 'DD-MM-YYYY') < '$(Vandaag)'
, 1
, 0
) as KEY_BedrOpgezegd


Rgds,

Rey-man

View solution in original post

2 Replies
Not applicable
Author

Hi FJPOS,

try this:



SET DateFormat
='DD-MM-YYYY';

LET Vandaag=Date(Today(), 'DD-MM-YYYY');
BedrijfOpzeg:


LOAD

IF(
date([BedrijfLidm Einddat], 'DD-MM-YYYY') < '$(Vandaag)'
, 1
, 0
) as KEY_BedrOpgezegd


Rgds,

Rey-man

Not applicable
Author

Many thanks, it works now.