Re: Re:Changeing Dates.
| From: | DL Neil | Date: | Sat, 26 Jan 2002 17:58:49 +0000 |
| Subject: | Re: Re:Changeing Dates. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82229@lists.php.net to get a copy of this message | ||
Or if you are retrieving the data from a database, use the SQL Date-Time functions (RTFM).
=dn
----- Original Message -----
From: "Rafael Perazzo B Mota" <perazzo_php@yahoo.com>
To: <php-general@lists.php.net>
Sent: 26 January 2002 16:38
Subject: [PHP] Re:[PHP] Changeing Dates.
> function ChangeDate ($date) {
>
> $day=substr($date,6,2); //get the day
> $month=substr($date,4,2); //get the month
> $year=substr($date,0,4); //get the year
> $time=substr($date,8,4); //get the time
> $secs=substr($date,12,2); //get the seconds
> $ret="$day $month $year @ $time h $secs s"; //var to be returned
> return ret;
>
> }
>
> This funcion gets the date in the format you have and converts into a string the way you want.
> I hope this help.
>
> Rafael Perazzo
>
> "Philip J. Newman" <newmanpj@philipsdomain.com> wrote on 26/01/02 14:35:30:
> >
> >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
>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>