Hi All ,
we are in a situation to select records in my sql on basis of Today's time as start time and Tomorrow's Time as end Time .
For eg : consider the following scenario
Start Dt : 2022-10-17 : 11:00 Am ( Current Day )
End Dt : 2022-10-18 : 03:00 Am ( Next Day )
If the current time falls in the following condition , so the select query have value else Not .This is for the purpose of Operative Hour concept in webapplication.
If anyone knows this query suggest me with example query .
Thanks in advance ,
Karthik .K


Raj Pamrar29 reputationPosted Oct 17, 2022, 2:16 AM EDT
SELECT property_id FROM yourtable WHERE date IN (CURDATE(), CURDATE() + INTERVAL 1 DAY) GROUP BY property_id HAVING COUNT(DISTINCT date)=2Sarang Babu16 reputationPosted Oct 17, 2022, 8:21 AM EDT
SELECT id FROM Tabe_name WHERE date IN (CURDATE(), CURDATE() + INTERVAL 1 DAY) GROUP BY id HAVING COUNT(DISTINCT date)=2