You are here: Re: Convert a date format « PHP Programming Language « IT news, forums, messages
Re: Convert a date format

Posted by NC on 12/18/72 11:49

Des wrote:
>
> I am displaying records from a table including a stored date. When
> display $row[Date], i get the obvious 2006-05-21. However this is not
> what the guy wants. He wants 21-May-2006.

First of all, make it a habit to write $row['Date'], not $row[Date].
The latter works for now, but may stop working in the future without
warning. This said, the code snippet you are looking for can look like
this:

date('j-M-Y', strtotime($row['Date']))

Cheers,
NC

 

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

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