Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
cmccafferty
New Contributor II

Does my date fall within a range?

 

Hi Guys,

I was hoping someone could help me.

Im trying to return a series of results whereby a holiday is currently going on, (ie: today's date is in between the Departure Date and the Return Date).

I dont have a database field for "Return Date" so I calculated this using the formula:  [Departure Date]+[TD Duration]

Can you tell me whether or not my formula below makes sense:

 

= if ( [Departure Date] <today() ,if( ( [Departure Date] + [TD Duration] ) >today() , "Yes" , "No" ) , "No" )

Many thanks

Christof

Tags (5)
1 Reply
mov
Esteemed Contributor III

Re: Does my date fall within a range?

Christof,

Logically it is correct.  It could look simpler though:

= if ([Departure Date] <today() AND  ( [Departure Date] + [TD Duration] ) >today(), "Yes", No" )

Regards,

Michael