Calculating Workdays in BAQs

I am trying to do a calculated field that would show how many days until a job is due or past due. It seems like a simple calculation, however, if you do DueDate – Today it doesn’t take into account for holidays and weekends in the production calendar.

Has anyone else ran into this issue or does anyone know of a function in E9 that may handle this in a BAQ?

If I am using the ProdCalDay table you can see which days are modified (Holidays) and you can exclude those in a calculated field I would assume, however, you still need to take in to account weekends.

According to EPICOR Help, "When a new calendar is created, Monday through Friday are, by default, considered working days; and Saturday and Sunday, by default, are considered non-woking days."

You can change days from working to non-working by selecting the day on the calendar and pressing "Toggle Day" button.

But I see your problem...the weekends are not added in the ProdCalDay. I'm assuming they are hard coded somewhere.

I dug through my emails and I asked EPICOR support the following question:

"If I want to calculate business days between say, OrderHed.DueDate and OrderHed.OrderDate, how do I go about doing that?"

Support answer: "Not the answer you want to hear but unfortunately this is too complex for a BAQ calculation. This will need to be done using custom code. If you are going to put this into crystal reports you can try our crystal group and see if this can be done through"

Copyright 1998-2015 Ziff Davis, LLC (Toolbox.com). All rights reserved. All product names are trademarks of their respective companies. Toolbox.com is not
affiliated with or endorsed by any company listed at this site.