- preg_match: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$value = 41568;
//Excel-Datum im Zahlenformat umwandeln in Datum 1 = 1.1.1900
if (preg_match("/^\d+$/", $value) && intval($value) > 0)
$value = date('Y-m-d', (strtotime('1970-01-01 12:00:00') + (($value - 25569) * 86400)));
echo $value."<br>";