That's easy enough, though: deal with the first and last days as special cases (with another special case if they are the same day), and use a standard tool for the ones inbetween.
| [reply] |
>> The 2 dates have a time component as well, so the first day
>> can start any time and the end date too. So, I will need to
>> calculate the HH:MM:SS for the first and last days as well.
That's actually already taken into account in my test script above.
It does the calculations in seconds and then converts to hours.
The hard part for you may be dealing with holidays.
| [reply] |