G
Guest
I have a StartDateTime & FinishDateTime for a roster. The Duty Period (DP) is
Finish minus Start. I need to be able to calculate the total duty worked over
the previous 24, 48 and 72 hour periods, calculated from each FinishDateTime,
so I may need to calculate all, part or none of the previous DP's.
eg
1/4 off
2/4 off
3/4 1000 - 1600
4/4 0800 - 1400
DP
1/4 = 0
2/4 = 0
3/4 = 6
4/4 = 6
24 hour total
1/4 = 0
2/4 = 0
3/4 = 6
4/4 = 8 (4/4 dp = 6 + 2 hours between 1400 & 1600 on 3/4)
48 hour total
1/4 = 0
2/4 = 0
3/4 = 6
4/4 = 12
etc
I hope someone enjoys this challenge as I have been trying for a long time
to figure it out
Thanks
Warren
Finish minus Start. I need to be able to calculate the total duty worked over
the previous 24, 48 and 72 hour periods, calculated from each FinishDateTime,
so I may need to calculate all, part or none of the previous DP's.
eg
1/4 off
2/4 off
3/4 1000 - 1600
4/4 0800 - 1400
DP
1/4 = 0
2/4 = 0
3/4 = 6
4/4 = 6
24 hour total
1/4 = 0
2/4 = 0
3/4 = 6
4/4 = 8 (4/4 dp = 6 + 2 hours between 1400 & 1600 on 3/4)
48 hour total
1/4 = 0
2/4 = 0
3/4 = 6
4/4 = 12
etc
I hope someone enjoys this challenge as I have been trying for a long time
to figure it out
Thanks
Warren