Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > Spira Custom Reports > Applying business hours t...
I have created a custom report to display all overdue tasks, and the number of days by which each task is overdue. However, I have only found a way to calculate that number using all days since the overdue date (ex. diffDays(CurrentDateTime(), R.End_Date) . In other words that calculation includes weekends. So if a task is one week overdue, I would like the report to indicate that the task is 5 days overdue, not 7 days. Does anyone know of a way to exclude non-business days from such a calculation?
Currently the Release includes the number of working / non-working days and the project specifies the number of standard working days per month and working hours per day, but they are not tied to the calendar dates directly, they are aggregate. So you'd need to hard code the calculation to use 5/7 of the value, or write a custom calculation of some kind.
I'd also check the Microsoft Entity SQL Docs to see what other functions exist - https://msdn.microsoft.com/en-us/library/system.data.objects.entityfunctions.diffdays(v=vs.110).aspx