0

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

2 Answers 2

2
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().

Sign up to request clarification or add additional context in comments.

Comments

2
SELECT
  x,y,z
FROM
  foo
WHERE
  task_end_date < Now()

Maybe you want Curdate() instead of Now().

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.