You are here: RE: [PHP] date parsing « PHP « IT news, forums, messages
RE: [PHP] date parsing

Posted by Jim Moseby on 09/13/05 20:49

>
> Greetings all,
>
> I am trying to find a function or a way to parse a date that has the
> following format 2005124 or 20051204.
>
> When I have a date that has a single digit (ie month, day)
> all the date/time
> function seem to go bizarre.
>
> When it is a full 8 digit string everything is fine.
> When there are delimiters between year month day (ie
> 2005-4-23) everything
> is fine.
>
> I tried strtotime(%Y/%m/%d, "2005124") and this is the result:
> 1970/01/23.
>
> Any thoughts?

Hi Phil,

There is no programmatic way to know. in the case of your example above,
"2005124", how would the program know whether it is supposed to be
2005-12-04 or 2005-1-24?

JM

 

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

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