Reply to Re: How to format a date?

Your name:

Reply:


Posted by Luuk on 09/28/52 12:00

"Martin" <martinvalley@comcast.net> schreef in bericht
news:cbtno3drn5bbvvgfttr4ftjq3r2vvk6vcg@4ax.com...
> On Mon, 14 Jan 2008 23:34:38 -0000, "Paul Lautman"
> <paul.lautman@btinternet.com> wrote:
>
>>Martin wrote:
>>> I'm retrieving some records from a database. One of the fields
>>> contains a date/time. I would like to format it as I send it out to
>>> the table in the displayed page.
>>>
>>> Can some one please tell me how I can/should do that? Or possibly
>>> point me to an on-line explanation?
>>>
>>> Thanks
>>>
>>> ps: if it makes any difference, the data is coming from a MS Access
>>> MDB file which I'm reading in via ODBC.
>>
>>It is a 6 step process:
>>
>>Step 1) Point your browser at www.google.com
>>Step 2) In the search box type: php date formatting
>>Step 3) Click the button labelled "I'm Feeling Lucky"
>>Step 4) Read the manual page that you are presented with
>>Step 5) Think "Why did I bother posting this question to usenet when I
>>could
>>have found the answer in an instant by doing steps 1-4"
>>Step 6) Vow to do the obvious and try to help myself in the fuure.
>>
>
> Thanks for the wise-ass answer Paul.
>
> The fact of the matter is, I already spent an hour or so Googling and
> experimenting with various things. In fact, I tried using the exact
> page that you so politely pointed out. But I quickly found out that
> that page actually explains how to format the system date value. As
> I'm sure you'll notice, if you would bother to read my question, I'm
> trying to format a date/time string that I'm retrieving from a
> database.
>
> I suggest that you re-word your step 5 to: Think "Why did I bother
> posting this question to a usenet group where I get smart-ass answers
> that don't do any good".
>
>
>
>


This page where you will end after step 4 says:
string date ( string $format [, int $timestamp ] )

so, if you use the correct timestamp you get out of your database.....

reading on, i reach example 1,
>> // prints something like: 2000-07-01T00:00:00+00:00
>> echo date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000));
This will convert the first day of the seventh mont in the yesr 2000 a
date........

so your suggestion indicates that you did NOT follow step 4 correctly? [ the
READ part ;) ]

[Back to original 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

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