Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
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
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().
curdate()
now()
Add a comment
SELECT x,y,z FROM foo WHERE task_end_date < Now()
Maybe you want Curdate() instead of Now().
Required, but never shown
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.
Explore related questions
See similar questions with these tags.