Reputation: 463
I have a mysql database table with a column called task_end_date and task_name.
I want to select all the task_name from the table where the current date has passed task_end_date. How would i do that in mysql using an sql query.
Thanks
Upvotes: 0
Views: 7484
Reputation: 342765
SELECT task_name FROM table WHERE curdate() > task_end_date
Note that curdate()
as its name implies has no TIME component. If time really isn't important, then curdate()
is the way to go, otherwise go with now()
.
Upvotes: 2