Hi,
I am working on a report that will break down the time of a surgery into shifts. I need a way to calculate the amount of time spent in each shift for a start datetime and end datetime. For example, if I have a surgery that starts at 0730 and ends at 1330 then the elapsed time for day shift is 360 minutes. If it started at 1430 and ended at 1530 then there would be 30 minutes for day shift and 30 minutes for evening shift. Also, if one started at 2330 and ended at 0430, the the evening shift would show 29 minutes and the day shift would show 270 minutes. There may also be times when a surgery could cross into all 3 shifts.
Any help would be greatly appreciated.
Eric
I am working on a report that will break down the time of a surgery into shifts. I need a way to calculate the amount of time spent in each shift for a start datetime and end datetime. For example, if I have a surgery that starts at 0730 and ends at 1330 then the elapsed time for day shift is 360 minutes. If it started at 1430 and ended at 1530 then there would be 30 minutes for day shift and 30 minutes for evening shift. Also, if one started at 2330 and ended at 0430, the the evening shift would show 29 minutes and the day shift would show 270 minutes. There may also be times when a surgery could cross into all 3 shifts.
Any help would be greatly appreciated.
Eric