mysql NOW() with defined time -


i need perform mysql select query date time field in table less todays date time of 2am.

how structure this

select * tbl datetimefield < (date(now()) , time 2am) 

thank assistance.

this worked:

select * tbl datetimefield < date_add(curdate(), interval 2 hour) 

fiddle - in fiddle used hard coded date '2013-05-04', work correctly later.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -