Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

cmccafferty
Not applicable

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
Not applicable

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