Related questions
Convert one date format into another in PHP
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…
PHP : strtotime() returns always 01/01/1970
I am trying to display dates in the European format (dd/mm/yyyy) with strtotime but it always returns 01/01/1970.
Here is my codeline :
echo "<p><h6>".date('d/m/Y', strtotime($row['DMT_DATE_DOCUMENT']))."</…
Convert a date format in PHP
I am trying to convert a date from yyyy-mm-dd to dd-mm-yyyy (but not in SQL); however I don't know how the date function requires a timestamp, and I can't get a timestamp from this string.
How is this possible?