PHP date issue, can't convert date before 1970-01-01
date, mysql, php
Solution
If your PHP version allow it consider Using DateTime instead of strtotime :
$date = DateTime::createFromFormat('d M Y','17 Jan 1900');
echo $date->format('Y-m-d');
For PHP version between >= 5.2 and <= 5.3 simply use the DateTime constructor :
$date = new DateTime('17 Jan 1900');
echo $date->format('Y-m-d');
Problem
The following code outputs `1970-01-01` which is wrong. ``` <?php $dob='17 Jan 1900'; $datetime = strtotime($dob); $dob = date("Y-m-d", $datetime); echo $dob; ?> ``` However it works fine with `$dob = '17 Jan 2000';`