How do I select date and time without the seconds in mysql from a column with date value in a table ? “YYYY-MM-DD HH:MM:SS” should be “YYYY-MM-DD HH:MM”
Advertisement
Answer
SELECT DATE_FORMAT(`date`, '%Y-%m-%d %H:%i') AS `formatted_date` FROM `table`;