Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Author

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

View solution in original post

2 Replies
Not applicable
Author

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

Anonymous
Not applicable
Author

Thanks for your answer