Pulling Date from MySQL Database Remove Time
php, sql
Solution
Try using MySQL's build in functions such as `DATE_FORMAT()` or even `DATE()`
SELECT
DATE_FORMAT(EventDate, '%Y-%m-%d') AS eventDate
FROM events;
SELECT
DATE(EventDate) AS eventDate
FROM events;
Problem
I am pulling the value EventDate from a table called events. At the moment is giving me a timestamp along with the date - 2012-05-29 00:00:00. Is there anyway to trim this in PHP?