You are here: Re: Formating dates from MySQL « PHP SQL « IT news, forums, messages
Re: Formating dates from MySQL

Posted by Jim Moseby on 07/08/05 03:00

Martin Toombs wrote:
> I'm trying to format a date field in PHP which has been stored in a date
> field and can't get it to work.
>
> I've tried date() and date_format() to no avail. It works if I want to
> display today's date, but I want to format the display of the date which
> is coming form the database field.
>
> Unformatted, it looks like 2005-07-02 21:53:00
>
> I want it to read July 2, 2005.
>
> Any help will be appreciated.

select date_format(datefieldname, "%M %e, %Y") from tablename;

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

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