G
Guest
Hello
I got date's and hours of arrival and departures trucks to store, but store is open only in workdays (its not equal Mo-Fr!) 6-22. I need to count hours when trucks not work because store us shut.
TruckNo, Arrival, Departure (date format yyyy-mm-dd hh:mm hh 24 hour format )
1, 2004-01-12 21:00 2004-01-13 06:00
2, 2004-01-12 18:00 2004-01-13 01:00
3, 2004-01-13 23:00 2004-01-14 05:00
4, 2004-01-11 21:00 2004-01-15 09:00
2, 2004-01-13 15:00 2004-01-14 02:00
1, 2004-01-13 11:00 2004-01-13 15:00
Day,Open, Closed
2004-01-11, 6 ,22
2004-01-12, 6 ,22
2004-01-13, 6 ,22
2004-01-14, 6 ,22
2004-01-15, 0 ,0
2004-01-16, 6 ,22
2004-01-17, 6 ,22
result
1, 2004-01-12 21:00 2004-01-13 06:00 =8h
2, 2004-01-12 18:00 2004-01-13 01:00 =3h
3, 2004-01-13 23:00 2004-01-14 05:00 =6h
4, 2004-01-11 21:00 2004-01-15 09:00 =8+8+8+11=35h
2, 2004-01-13 15:00 2004-01-14 02:00 =4h
1, 2004-01-13 11:00 2004-01-13 15:00 =0h
or better for my use
1, 2004-01-12 22:00 2004-01-13 06:00 =6h
2, 2004-01-12 22:00 2004-01-13 01:00 =3h
3, 2004-01-13 23:00 2004-01-14 05:00 =6h
4, 2004-01-11 22:00 2004-01-12 06:00 +
4, 2004-01-12 22:00 2004-01-13 06:00 +
4, 2004-01-13 22:00 2004-01-14 06:00 +
4, 2004-01-14 22:00 2004-01-15 09:00 = 8+8+8+11=35h
2, 2004-01-13 22:00 2004-01-14 02:00 =4h
1, 2004-01-13 11:00 2004-01-13 11:00 =0h
or
1, 2004-01-13 15:00 2004-01-13 15:00 =0h
Thanks
I got date's and hours of arrival and departures trucks to store, but store is open only in workdays (its not equal Mo-Fr!) 6-22. I need to count hours when trucks not work because store us shut.
TruckNo, Arrival, Departure (date format yyyy-mm-dd hh:mm hh 24 hour format )
1, 2004-01-12 21:00 2004-01-13 06:00
2, 2004-01-12 18:00 2004-01-13 01:00
3, 2004-01-13 23:00 2004-01-14 05:00
4, 2004-01-11 21:00 2004-01-15 09:00
2, 2004-01-13 15:00 2004-01-14 02:00
1, 2004-01-13 11:00 2004-01-13 15:00
Day,Open, Closed
2004-01-11, 6 ,22
2004-01-12, 6 ,22
2004-01-13, 6 ,22
2004-01-14, 6 ,22
2004-01-15, 0 ,0
2004-01-16, 6 ,22
2004-01-17, 6 ,22
result
1, 2004-01-12 21:00 2004-01-13 06:00 =8h
2, 2004-01-12 18:00 2004-01-13 01:00 =3h
3, 2004-01-13 23:00 2004-01-14 05:00 =6h
4, 2004-01-11 21:00 2004-01-15 09:00 =8+8+8+11=35h
2, 2004-01-13 15:00 2004-01-14 02:00 =4h
1, 2004-01-13 11:00 2004-01-13 15:00 =0h
or better for my use
1, 2004-01-12 22:00 2004-01-13 06:00 =6h
2, 2004-01-12 22:00 2004-01-13 01:00 =3h
3, 2004-01-13 23:00 2004-01-14 05:00 =6h
4, 2004-01-11 22:00 2004-01-12 06:00 +
4, 2004-01-12 22:00 2004-01-13 06:00 +
4, 2004-01-13 22:00 2004-01-14 06:00 +
4, 2004-01-14 22:00 2004-01-15 09:00 = 8+8+8+11=35h
2, 2004-01-13 22:00 2004-01-14 02:00 =4h
1, 2004-01-13 11:00 2004-01-13 11:00 =0h
or
1, 2004-01-13 15:00 2004-01-13 15:00 =0h
Thanks