Click here to Skip to main content
15,868,340 members
Articles / Programming Languages / C#

Calculate Business Hours

Rate me:
Please Sign up or sign in to vote.
4.95/5 (8 votes)
13 Apr 2012CPOL 42.6K   22  
Calculation of business hours (including holidays) using the Time Period Library for .NET

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
23 Feb 2010Gaurav Dudeja India 1 alternative  
Method to find out business hours in between two dates. public static double CalculateBusinessHours(DateTime dtStart, DateTime dtEnd) { int StartingHour = 9; int EndingHour = 18; // initialze our return value double OverAllMinutes = 0.0; ...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Switzerland Switzerland
👨 Senior .NET Software Engineer

🚀 My Open Source Projects
- Time Period Library 👉 GitHub
- Payroll Engine 👉 GitHub

Feedback and contributions are welcome.



Comments and Discussions