Reputation: 393
I'm setting in another section that it saves with curdate()
; the date into a DB after that I want to list the value in a table with its time but when I try to make it this way:
echo "<td style='width: 15%;'>". date("d.m.Y H:i:s", strtotime($row['Erstelldatum'])) . '</td>';
The format is right (German) but the time is not correct. What is wrong here? Is the DB format wrong?
Upvotes: 0
Views: 76
Reputation: 24276
The field type in database must be DATETIME
. Your current type is DATE
.
Upvotes: 3