It is not entirely clear what exactly you want, because this:
17.1.1962
It turns out elementary:
echo "$day.$month.$year";
You can look towards DateTime , for example:
$date = DateTime::createFromFormat('m/d/Y', "$month/$day/$year"); echo $date->format('F j, Y'); // Janyary 17, 1962
But you need to be prepared for the fact that:
echo $date->getTimestamp();
-251050001 . In fact, this is the reason for all the troubles: EMNIP, only Windows does not know how to work with negative timestamp values, and for this OS you have to make crutches. Others are fine with this:
$ cat ./d.php && uname && ./d.php #!/usr/bin/php <?php $day = '17'; $month = '1'; $year = '1962'; $tstamp = mktime(0, 0, 0, $month, $day, $year); $born = date( $tstamp ); echo "$tstamp <=> ".date('dnY', $born); Linux -251089200 <=> 17.1.1962