netWorkDays not working?

I am trying to track the number of days between 2 days (using only work days).

The netWorkDays function would be perfect but it doesn’t seem to be working.
I thought it could have been how I was setting up my fields so I created a simple table with just 2 dates and the difference, but the answer is always zero.


So is this a knack bug or do I just have something set up wrong?
Anyone got this to work?

You’ll want to try setting that equation to a Numeric type instead of a Date type. That’ll give you the correct result.

1 Like

Thanks, @Kat that worked. You may consider removing that formula from the date function dropdown list since it doesn’t work there.

After a solid hour scratching my head, I finally found this post which explains why netWorkDays didn’t work for me. -_-

AND on top of that I had to deal with another problem, because I get the wrong results if I do:
Answer=netWorkDays(my_date, currentTime())

But if I do:
Today=currentTime()
Answer=netWorkDays(my_date, Today)
then it works…

I really feel that the documentation on how to work with dates should be expanded. Maybe it is just me, but this rather basic feature gives me rather frequent headaches.

2 Likes