Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Contributor II

Calc to last 45 days from today

Hi,

 

Can some one help here , i am trying to create  a flag in load script  for one date field

 

 the date should give me always last 45 days from today  

 

Normally to get 60 days from today i wrote below by using ADD months  and it works , same how can we write for 45 days.


IF( Date(Floor( [Last True Billable SubTask Actual End date]),'MM/DD/YYYY') > AddMonths(Today(), -2) , 1, 0)

Labels (1)
1 Solution

Accepted Solutions
Highlighted
Contributor II

Re: Calc to last 45 days from today

HI,

 

Thank You . it works. 

View solution in original post

3 Replies
Contributor

Re: Calc to last 45 days from today

Hi,
Try this..


IF( Date(Floor( [Last True Billable SubTask Actual End date]),'MM/DD/YYYY') > (Today()-45) , 1, 0)
Highlighted
Contributor II

Re: Calc to last 45 days from today

HI,

 

Thank You . it works. 

View solution in original post

Highlighted
Contributor II

Re: Calc to last 45 days from today

Hi,

Sorry.

Its not working as expected , bec i can see dates greater than today date as per below snapshot