Results 1 to 5 of 5
Jan 24, 2013, 04:35 #1
Select with date and hour interval
hi there, hope in your help.
I need to extract from my table:
- all the rows of the previous day;
- all the rows of the current day until 6 o'clock in the morning;
I tried this query but the output is null, I have two rows with previous day.
Can you help me?
SELECT * FROM mytable WHERE myDate BETWEEN DATE_SUB( CURRENT_DATE (), INTERVAL 1 DAY ) AND ( CURRENT_DATE () AND myHour < '06:00' );Thanks you very much for your help
I'm really happy for your quickly answer.