Reputation:
I have my records in mysql stored with a datetime column. I would like to get records that are greater than the current date.
example: select * from MY_TABLE WHERE mytime is greater than today.
I know I need to use DATE_FORMAT but not sure how to construct the query.
Thanks.
Upvotes: 1
Views: 5771
Reputation: 143124
I think you just need to do:
SELECT * FROM table WHERE mytime > NOW()
Upvotes: 4