Re: Changeing Dates.

From: Date: Sat, 26 Jan 2002 16:45:45 +0000
Subject: Re: Changeing Dates.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-82223@lists.php.net to get a copy of this message
Hi, provided that your initial string will always be in the same format (same # of numbers) I would use the substr function. substr(string, start, [length]) Ex: $mystring = "20020124020555"; $year = substr($mystring,0,4); $month = substr($mystring,4,2); $day = substr($mystring,6,2); etc... Hope this helps. Jeff ----- Original Message ----- From: "Philip J. Newman" <newmanpj@philipsdomain.com> To: <php-general@lists.php.net> Sent: Saturday, January 26, 2002 8:35 AM Subject: [PHP] Changeing Dates. I have had no luck changing: 20020124020555 into 24 01 2002 @ 0205h 55s Can anyone put some light on this, I'm going nuts Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ info@philipsdomain.com Phone: +64 25 6144012

« previous php.general (#82223) next »