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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -