Calculate duration in business hours


I have a postgresql DB with a ticket creation timestamp and a first response timestamp. I want to calculate the minutes from creation to first response. But i need to count only the business hours (6:30am to 6 pm) on working days. So no weekend for the calculation.

Any idea how to achive this?

best regards