You are here: Re: More noob nonsense - output format for a timestamp date variable « PHP Programming Language « IT news, forums, messages
Re: More noob nonsense - output format for a timestamp date variable

Posted by hph on 04/27/06 05:44

In article <124u2qjs1abpr56@corp.supernews.com>,
gordonb.787qs@burditt.org (Gordon Burditt) wrote:

>
> SELECT DATE_FORMAT(stamp, '%m/%d/%y'), ...
> if you absolutely insist on writing non-Y2K-compliant code.
>
> Gordon L. Burditt


Thanks.

$last_donation=mysql_query("SELECT DATE_FORMAT($year_data[2],
'%j/%n/%Y'");

gave me what I wanted. $last_donation was a variable that I later
echoed, and year_data was a result array into which I'd fetched data,
including a TIMESTAMP data field.

I'm all for Y2K compliance (I won't, however, be around when Y10K
becomes an issue...), but in this case, I'm simply displaying a date in
a format that, I think, seems to appeal to the majority of people in the
US who think of dates as just dates and not data.

Thanks for your patience in answering my trivial questions.

 

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

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