Dear <@926476511421288479>
Many thanks for your efforts brother.
Could you please solve a query that calculate working hours between two dates which working hours are :
SAT – THU —> Working Hours is from 7AM to 11PM
Fri —> Working Hours is from 1PM to 11PM
Example 1:
Inputs :
Date 1 = Saturday 22-06-2024 09:30 PM
Date 2 = Monday 24-06-2024 08:00 AM
Output: 18.5 hours
Example 2:
Inputs :
Date 1 = Saturday 22-06-2024 09:30 PM
Date 2 = Sunday 23-06-2024 08:00 AM
Output: 2.5 hours
Cause the time between 11PM to 7AM is dead for Saturday to Thursday
I’ve tried many time to reach the solution but it’s difficult for me
Anwar Algawzi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.