I have a small database which collects the name and time/date. The fields are both text
time varchar (255)utf8_general_ci
name varchar (255)utf8_general_ci
When the date is inserted into the database it is in this format Mon, 21 Nov 2022 10:05:13 +0200
I want to change it 2022-11-21 in my report
while ($results = $query->fetch()) {
echo '<tr>';
echo '<td>'. $results['name'] . '</td>';
echo '<td>'. $results['time'] . '</td>';
echo '</tr>';
I have tried to find a solution but seem to get stuck when I try and add it into the actual report. the last one I tried was
" date("d-m-Y", strtotime($time)); "
Any help would be greatly appreciated