Networkdays bug on 8.01 version?

by QVApps on April 6, 2009

I was not planning to get this kind of detailed topic as my second post, but life is what happens while you are busy making plans…

Before you start asking: I know version 8.5 is out (even with a QV 9 beta 2 on the way) ,  but we have a 8.01 server so we keep the QV clients aligned with the server version otherwise our applications go funny.

The issue is the following: I was doing some dates calculations, more precisely I was trying to see the difference in working days between two dates. In my specific case the date the customer requested the order to be delivered and the actual date the order was delivered.

I used the Networkdays function as it was the logical choice for the task. The problem arose when I checked the single orders results. More in detail, the function was seeing that the difference between two equal dates should have been 0.

So, a request date of 01/01/2008 and a delivery date of 01/01/2008 would get a result of 1 with Networkdays while I was expecting a 0.

Bottom line this was messing my statistics…

I checked the release notes and apparently some fixing was done on this function on 8.5. I hope it includes the above, in any case, it’s worth noting down.

I “solved” the issue by using a simple “equal” statement. Not the nicest solution (this might have some side issues I cannot foresee), but when checking the details it seems to be doing fine…

The Spark

Leave a Comment

Previous post:

Next post: