Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
Thanks for your answer