John Taylor-Johnston wrote:
Is there a way to reverse engineer http://www.php.net/manual/en/function.date.php ?
I want to feed in 2003-02-28 and extract February 28, 2003. I can substr it out ...
$eventid = 2003-02-28;
$year = substr($eventid, 0,4);
$month = substr($eventid, 5,7);
$year =
On Wed, 2004-02-25 at 15:58, John Taylor-Johnston wrote:
I want to feed in 2003-02-28 and extract February 28, 2003. I can substr it out ...
Use strtotime[1] then date[2].
[1] http://www.php.net/strtotime
[2] http://www.php.net/date
--
Adam Bregenzer
[EMAIL PROTECTED]
Actually, your use of substr is incorrect. The third parameter is how
many characters you want to go from your offset, not the ending
character. Also, your last variable shouldn't be year...it should be
day (or whatever you want to name it...anything but year or month :) ),
otherwise you will
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
the other 3 answers were more appropriate
what newsreader are you ppl using?
is anyone else getting anoyed with posts out of chain? :p
Sam Masiello wrote:
Actually, your use of substr is incorrect. The third parameter is how
many characters you want
[snip]
what newsreader are you ppl using?
is anyone else getting anoyed with posts out of chain? :p
[/snip]
Yes...and top posting and failure to snip.all annoying
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
5 matches
Mail list logo