tags:

views:

32

answers:

1

Hi, 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.

+2  A: 

I think you just need to do:

SELECT * FROM table WHERE mytime > NOW()
Ben Alpert
Thank you. Works great :)