My order table consist of 2 fields
Time_RX (datetime) dateTime order has been placed
Time_TX (datetime) dateTime order has been handled
Now I have to calculate the responsetime between placing an handling, with bussiness hours taken into account!
What I mean is:
Suppose Bussinesshours : 08:00 - 17:30
Suppose an order has been placed at 16:30, but is handled the next day at 09:00.
ResponseTime should be
16:30 - 17:30 (1 hour)
08:00 - 09:00 (1 hour)
2 hours
Is it possible to build a query doing this?
Time_RX (datetime) dateTime order has been placed
Time_TX (datetime) dateTime order has been handled
Now I have to calculate the responsetime between placing an handling, with bussiness hours taken into account!
What I mean is:
Suppose Bussinesshours : 08:00 - 17:30
Suppose an order has been placed at 16:30, but is handled the next day at 09:00.
ResponseTime should be
16:30 - 17:30 (1 hour)
08:00 - 09:00 (1 hour)
2 hours
Is it possible to build a query doing this?