Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

fibonacci11
New Contributor

Calculate the difference between today and a future date

Hello!  I wonder how I can calculate the difference in days between today and a future date.

The dateformat I'm using is YYYY-MM-DD.

So how do I do to caluclate the difference between today, 31 st of May, and for example 17 th of June?

And if I want to exclude weekends (they should not be calculated) how do I do then?

Thanks in advance

1 Solution

Accepted Solutions
Not applicable

Calculate the difference between today and a future date

Hi,

you should be able to use the function networkdays() as follows:

networkdays(today(),makedate(2011,6,17))

The function eliminates Saturdays and Sundays. You could also add dates as a third parameter that should not be counted, such as national holidays. See the QV help for reference.

Good luck,

Jonas, QlikView Consultant @ Optivasys | www.optivasys.se

2 Replies
Not applicable

Calculate the difference between today and a future date

Hi,

you should be able to use the function networkdays() as follows:

networkdays(today(),makedate(2011,6,17))

The function eliminates Saturdays and Sundays. You could also add dates as a third parameter that should not be counted, such as national holidays. See the QV help for reference.

Good luck,

Jonas, QlikView Consultant @ Optivasys | www.optivasys.se

fibonacci11
New Contributor

Calculate the difference between today and a future date

Thanks for your answer