How to calculate days a ticket is open/closed?

Copper Contributor

I want to calculate a TAT (turnaround time), which will give me the effective business hours in which the ticket came and closed.

for this, consider the following criteria

1. Shift starts from 6:00 am Monday and ends on the next day at 3:00 am

2. The working days are Monday to Friday.

3. The cut-off time is 3:00 am to 6:00 am which is nonbusiness hours.

so I want to calculate the TAT for:-

a) Coming in on Monday and closing on Wednesday and

b) another ticket coming on Friday and closing on Monday.


Kindly provide a valuable solution, I want to perform this activity in an SQL database.

1 Reply
That's really to less on information.
Please post table design as DDL, some sample data as DML statement and the expected result.