i have a date '07/23/2009' and a time '18:11' and i want to get a timestamp out of it :
here is my example:
date_default_timezone_set('UTC');
$d = str_replace('/', ', ', '07/23/2009');
$t = …
If I have a PHP string in the format of mm-dd-YYYY (for example, 10-16-2003), how do I properly convert that to a Date and then a DateTime in the format of YYYY-mm-dd? The only reason I ask for both …
Is there a simple way to convert one date format into another date format in PHP?
I have this:
$old_date = date('y-m-d-h-i-s'); // works
$middle = strtotime($old_date); // returns bool(false)
$new_date = date('Y-m-d H:i:s', $middle); // returns 1970…