Date query help..

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Frozenlight777
Forum Commoner
Posts: 75
Joined: Wed May 28, 2008 12:59 pm

Date query help..

Post by Frozenlight777 »

I have a dataset where there are fields; start, end, timeperiod...

I'm trying to figure out how to query the concurrent times, for example if the data was:
7:00-12:00
9:00-12:00
10:00-12:00

They are all concurrent but how would I be able to query the three times? I'm assuming there is a range function in mysql to check the range for each time to see if they match at all but I really have no idea, i'm sure it's just a math/logic problem I'm having.

Thanks
Post Reply