I don't know, if that's common knowledge, but I found it very useful.
A friend of mine recently asked me, which internal date format M$ Excel uses (you all know that weired float numbers that appear if you reformat a date cell in Excel). After some searching and playing around he found out, how to convert those numbers to dates:
function xsltotime($value) {
return date("d.m.Y - H:i:s",(($value - 25569)*86400)-7200);
}
$value = 38147.53801; // Date ix "Excel"-format
echo xsltotime($value);Maybe that's useful for anyone.
If you liked this blog post or learned something, please consider using flattr to contribute back: .
Fields with bold names are mandatory.
Emil Tamas
That's cool :) but name your function xlstotime (XLS = eXcel SpreadshiT) not XSLtotime wich I guess reffers to eXtensible Stylesheet Templates ....blah, joking.
Link to commentEmil