Reputation: 300
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?
Upvotes: 0
Views: 39
Reputation: 263883
use DATE
SELECT DATE(columnName)
FROM....
or DATE_FORMAT
SELECT DATE_FORMAT(NOW(),'%Y-%m-%d');
Upvotes: 2