You are here: Re: displaying pre-1970 dates « PHP Programming Language « IT news, forums, messages
Re: displaying pre-1970 dates

Posted by Bosconian on 02/05/06 22:03

"Gordon Burditt" <gordonb.z8la0@burditt.org> wrote in message
news:11u8eefk2sda38b@corp.supernews.com...
> >I must be having a brain freeze because I can't figure out how to display
> >dates older than 1970.
> >
> >I have birth dates stored in MySQL as "date" data types (exp.
1955-04-06).
> >I'd like to display as "April 4, 1955".
>
> I recommend formatting it with MySQL's date_format() function.
>
> e.g.
>
> SELECT date_format(birthdate, "%M %e, %Y") from table where ...;
>
> MySQL's datetime format manages to cover years from 1 to 9999.
>
> Gordon L. Burditt

You're absolutely correct; this can be done in the query and is actually
faster that way.

However, when it's abolutely necessary in PHP the function posted in my
previous message works nicely.

 

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

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