You are here: Re: [Date] Converting dd/mm/yyyy to YYYY-MM-DD? « PHP Programming Language « IT news, forums, messages
Re: [Date] Converting dd/mm/yyyy to YYYY-MM-DD?

Posted by Vincent Delporte on 01/11/07 03:26

On Thu, 11 Jan 2007 03:57:03 +0100, Vincent Delporte
<justask@acme.com> wrote:
>There may be a better way, such as telling PHP that the dates are
>formatted as dd/mm/yyyy instead of mm/dd/yyyy so that strtotime will
>work without the above kung-fu, but I don't know.

And if you want to do the opposite when reading dates from MySQL and
display them in a web page:

$query = "SELECT name,DATE_FORMAT(mydate,'%d/%m/%Y') FROM mytable";

Maybe it's possible to configure MySQL so that it always spits out
dates as dd/mm/yyyy to avoid using DATE_FORMAT().

 

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

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