Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to calculate number of days from the difference of two dates i.e 23-08-2017 and 24-02-2017 in Load Editor of qilksense.
Kindly help.
Hi,
Try like this,
interval(date1-date2,'D') as Days
Regards,
but its giving 180 days but it should be 181 days.
add +1
interval(date1-date2+1,'D')
Still not getting right answer because 23-08-2017 minus 23-08-2017 has to be 0 but +1 makes it 1 which is not correct.
Kindly give the alternate option.
check this,
if(date1=date2,interval(date1-date2,'D'),interval(date1-date2+1,'D'))
Do you want the interval to be inclusive (23-08-2017 and 24-02-2017 = 181), or exclusive ( 23-08-2017 minus 23-08-2017 has to be 0)
Inclusive 181 and 1
Exclusive 180 and 0