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
Post a Comment