Workdays Calculation - omit Saturday, Sunday

Stimulsoft Reports.NET discussion
Post Reply
JHenn
Posts: 20
Joined: Fri Jun 01, 2018 9:23 pm

Workdays Calculation - omit Saturday, Sunday

Post by JHenn »

Can anyone recommend a method to calculate, not just a Datediff value, but a difference between two dates that considers only Monday through Friday (omitting Saturday and Sunday)? Any direction would be much appreciated.
Judy Hennessey / PrecisionBI
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Workdays Calculation - omit Saturday, Sunday

Post by HighAley »

Hello,

Sorry, there is no such method in our tool.
But you could add your own custom function.
https://www.stimulsoft.com/en/documenta ... ctions.htm

Thank you.
JHenn
Posts: 20
Joined: Fri Jun 01, 2018 9:23 pm

Re: Workdays Calculation - omit Saturday, Sunday

Post by JHenn »

Thank you, HighAley. Unfortunately, we do not have the means to create functions in our end-user interface. Instead, I modified some C# scripting I found from various sources and added that as a BeforePrint event to populate a variable with the BusinessDays figure. That's not user-friendly but it seems to have achieved the result.
Judy Hennessey / PrecisionBI
Lech Kulikowski
Posts: 7341
Joined: Tue Mar 20, 2018 5:34 am

Re: Workdays Calculation - omit Saturday, Sunday

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Post Reply