5 Replies Latest reply: May 27, 2012 3:52 AM by Jason Michaelides RSS

how to find number of months when one of the date is system date/current date

Hi All,

 

I need to count the number of months between 2 dates. the first date is a field called OPEN_DATE and the second date is the Current system date/Current date vice versa.

 

My logic needs to work as

 

If count(month (OPEN DATE- CURRENT DATE))>=6 or count(month(OPEN DATE-CURRENT DATE))<=12 , 1,0 as FLAG

 

I would be using this logic in my Load script where I get the field OPEN DATE from an excel source. In the above expression 6 & 12 shows that anything which has a count between 6 & 12 months should have the value 1. Current date is the current date of that day when I am loading the script.

 

Please help me write this logic in Qlikview code. Appreciate all your help In Advance.

 

Thanks,

Tutan