jamest
jamest

Reputation:

How to select dates greater than current using date_format

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

Answers (1)

Sophie Alpert
Sophie Alpert

Reputation: 143124

I think you just need to do:

SELECT * FROM table WHERE mytime > NOW()

Upvotes: 4

Related Questions