Using the MySQL datetime column type I am storing the date/time a record was submitted. That works fine using something like:
$time = date("Y-m-d H:i:s");
The problem is that when I get the date out of the database I want to reformat it so it's more friendly on the eyes.
So basically I want to take the MySQL time and put it back into a format where date can properly handle it.
I tried:
$newtime = date("l F j, Y, g:i a", $time);
Which worked, except for the fact that it says the time is:
Thursday January 1, 1970, 7:56 am
And my system clock isn't that far off, lol!
And the DB correctly stored the date as 2001-04-02 19:47:28, sooo...
How would I take a MySQL DATETIME field and "unformat" it so date() can make sense of it?