Re: Date formatting in PHP 3.0
| From: | * R&zE: | Date: | Thu, 30 Aug 2001 16:50:07 +0000 |
| Subject: | Re: Date formatting in PHP 3.0 | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65330@lists.php.net to get a copy of this message | ||
<Original message>
From: Paul McGee <pmcgee@inprise.com>
Date: Thu, Aug 30, 2001 at 12:45:49PM -0400
Message-ID: <20010830174139.31338.qmail@pb1.pair.com>
Subject: Re: [PHP] Date formatting in PHP 3.0
> Thanks, I knew it was something stupid!
>
> However, the $dy = date ("D", $row[0]) doesn't work.
</Original message>
<Reply>
You're welcome...
and eh... for the "However, the $dy = date ("D", $row[0]) doesn't
work.":
It shouldn't. date() requires a timestamp as a second argument, not
a string. Unless you retrieve an actual timestamp from your db
(which you don't) you could directly feed it to date(). So as long
as you get strings from your db you'll have to parse 'm first and
then put them through mktime() (like you do in your example). Then
you have a real timestamp and you can put that through date().
</Reply>
--
* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: renze@datalink.nl
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««