0

I am querying some data from MySQL table, one of the column has a datatype DATETIME. Now when I do query, it includes an annoying 00:00:00 time. How can I exclude this time part when doing a select?

1 Answer 1

2

use DATE

SELECT DATE(columnName)
FROM....

or DATE_FORMAT

SELECT DATE_FORMAT(NOW(),'%Y-%m-%d');
Sign up to request clarification or add additional context in comments.

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.