Reply to Re: Timestamps for 1800's

Your name:

Reply:


Posted by Michel on 07/20/05 18:53

have the monthnames in an array.
split on spaces
loop array until you find the right month
add 1 (or have array[0]='none'; )
put string together in your format
done

"DJ Craig" <spit@djtricities.com> wrote in message
news:1121869645.273644.174560@o13g2000cwo.googlegroups.com...
> I'm trying to convert this date:
> 12 May1868
> Into this:
> 18690512
> That's YYYYMMDD. So first I need to convert it to a UNIX time stamp
> using the strtotime() function, then convert it to YYYYMMDD. This
> works for more rescent dates:
> $d = date('Ymd', strtotime($d));
> I tested that with 19 July2005, and it worked. But the strtotime()
> function seems to return -1 for dates before the UNIX epoch. How can I
> convert these dates?
>

[Back to original 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

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