Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm a bit new at QV and would like to calculate months between two dates. Struggling a bit to write this...
=if(EXIT_DATE Isnull then addmonths_between(ENTRY_DATE and TODAY())
else
addmonths_between (ENTRY_DATE and EXIT_DATE)
Hi,
try like this,
set variable like below,
SET MonthDiff = Num(((year($2) * 12) + month($2)) - (((year($1) * 12) + month($1))) + 1);
load *, $(MonthDiff(FromDate, ToDate)) AS MonthsDifference;
load * Inline [
FromDate,ToDate
2017-01-25,2017-09-19
2016-02-25,2017-03-19
];