I\'m trying to grab the date from my database in a standard timestamp and display it as ISO 8601. I\'m unable to easily do it in PHP so I\'m trying to do it in my SELECT st
The DATE_FORMAT(DateColumn) has to be in the SELECT list:
DATE_FORMAT(DateColumn)
SELECT
SELECT DATE_FORMAT(date, '%Y-%m-%dT%TZ') AS date_formatted FROM table_name ORDER BY id DESC