note 30629 deleted from ref.datetime by felipe
| From: | felipe@php.net | Date: | Mon, 10 Dec 2007 17:40:10 +0000 |
| Subject: | note 30629 deleted from ref.datetime by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133181@lists.php.net to get a copy of this message | ||
Note Submitter: you NOSPAM don't need 2 know ETC
----
EXCEL DATES TO UNIX TIMESTAMPS
----------------------------
I get a lot of dates which are sent to me in those dastardly Excel spreadsheet things. For example,
the date 15 April 1976, Excel stores as 27865.
I convert these to UNIX timestamps using the little function below.
<?
function xl2timestamp($xl_date)
{
$timestamp = ($xl - 25569) * 86400;
return $timestamp;
}
?>