Hi all,
I am working on an SQL Query which return data between two times during the day.
This works fine:
SELECT ScheduledTime, Flight, Logo, IATALookup, RemarksWithTime, Terminal FROM LHRFlightStats24_Vanilla WHERE ScheduledDateTime BETWEEN NOW() - INTERVAL 45 MINUTE AND NOW() + INTERVAL 90 MINUTE AND ArriveDepart = 'O' AND FlightDisplay = 'Y' ORDER BY ScheduledTime ASC
In the table I have a feild called "ScheduleTime" which is a time type, example "12:02:00"
If I change the query replacing NOW() with CURTIME() it does not work
SELECT ScheduledTime, Flight, Logo, IATALookup, RemarksWithTime, Terminal FROM LHRFlightStats24_Vanilla WHERE ScheduledTime BETWEEN CURTIME() - INTERVAL 45 MINUTE AND CURTIME() + INTERVAL 90 MINUTE AND ArriveDepart = 'O' AND FlightDisplay = 'Y' ORDER BY ScheduledTime ASC
Is there a way to use CURTIME() or am I doing this completely wrong.