Hi Everyone,
I am creating a mySQL table where one column is last_updated. I have that as timestamp Type and default CURRENT_TIMESTAMP. So as people fill out the form to get on the list it marks when they filled out the form.
Through Dreamweaver I am creating a page where the members of the list and shown with the last_updated column. My issue is I only want the date and not the time to populate the field.
I have tried DATE_FORMAT('%m %d %y', last_updated) AS DATE and for my table code I have
<td><?php echo $row_Recordset3['DATE']; ?></td>
It is not working but I am getting no errors just nothing shows up in the last_updated column on the page showing the members of the list.
I am not sure if I have to first separate the date and time from the CURRENT_TIMESTAMP data.
Any suggestions would be appreciated, thanks in advance.
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html
This SELECT should get you the ISO-8601 format date, which is the right format for all internal representations.
SELECT DATE_FORMAT(date, '%Y-%m-%dT%TZ') FROM table_name