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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -