Hello,
In a MySQL database, I have a datetime column. The format for this column is YYYY-MM-DD HH:MM:SS.
If the correct formate for the time is not inserted, It will just appear as 0000-00-00 00:00:00. So to get the correct time from a PHP script, I use code like this:
$datetime = date("Y-m-d H:i:s");
Now that it is in the database, I want to get it out (I know how to do this) and change it into something like Aug 12 2002 2:34pm. I also want to be able to apply time zones to it.
Any suggestions on how to do this?