MySQL Forums
Forum List  »  InnoDB

time difference - business hours only
Posted by: michael hill
Date: March 09, 2009 08:20AM

Hello all,
I have a simple database of tickets. Once ticket is submitted there is DATETIME saved. I need to count time of the ticket but during business hours only, let's say 9-17 and on week days only. Also clock can be stopped when ticket is in "pending" status.

I found another topic here on forums but it is not finished and did not work for me.

I can count time on week days only:
SELECT id FROM tickets WHERE DATE_FORMAT(submitted, '%W') NOT IN ('Saturday','Sunday')

..but those business hours are mystery for me.

Anyone have any ideas?
Many thanks in advance!!

Options: ReplyQuote


Subject
Views
Written By
Posted
time difference - business hours only
6675
March 09, 2009 08:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.