$date = '2040-02-01'; $format = 'l d F Y H:i'; $mydate1 = strtotime($date); echo date($format, $mydate1);
If you’re seeing a date in the late 60’s or early 70’s ,your php affected by Y2K38 Bug.
alternative solution:
Use DateTime class in PHP version 5.2.
$mydate2 = new DateTime($date); $mydate2->format($format),
0 comments:
Post a Comment