MySQL Forums
Forum List  »  PHP

Query with overall date range and start/end time ranges
Posted by: Rational Rabbit
Date: April 23, 2012 07:53AM

This one has me baffled.
I'm working on a map tracking program. The user has to know where the vehicle was during a specific date/time period.

Dates There are simply two date periods; StartDate and EndDate.

Time There is a selection of 4 time periods for each date (StartDate and EndDate), dividing each date into quarters.

So the query would create the effect of
Date >= StartDate AND Time >= StartTimeRangeMin {on StartDate} AND Time <= StartTimeRangeMax {on StartDate) AND Date <= EndDate AND Time >= EndTimeRangeMin {on EndDate} AND Time <= EndTimeRangeMax {on EndDate).

Fields are date or time fields.

Options: ReplyQuote

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.