|
Posted by Ewoud Dronkert on 12/09/05 02:15
NC wrote:
> Assuming all your dates are after January 1, 1970,
> here is a quick fix:
>
> function MStoUnix ($MSdate) {
> return round(($MSdata - 25569) * 24 * 60 * 60);
> }
>
> This function converts a Microsoft "timestamp" (number of days since
> January 1, 1900) into a Unix timestamp (number of seconds since January
> 1, 1970). Then you can format the resulting timestamp using the date()
> function. For example, this snippet:
>
> echo date('Y-m-d', MStoUnix(38694));
>
> would output "2005-12-08".
Oh really!
--
E. Dronkert
[Back to original message]
|