You are here: Re: Integer date to readable dates « PHP Programming Language « IT news, forums, messages
Re: Integer date to readable dates

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация