RE: [PHP] Formatting time :/
| From: | Steven Macintyre | Date: | Tue, 02 Jan 2007 13:02:20 +0000 |
| Subject: | RE: [PHP] Formatting time :/ | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246348@lists.php.net to get a copy of this message | ||
Thanks Stut,
Perfect!
Kind Regards,
Steven Macintyre
http://steven.macintyre.name
--
http://www.friends4friends.co.za
> -----Original Message-----
> From: Stut [mailto:stuttle@gmail.com]
> Sent: 02 January 2007 02:59 PM
> To: Steven Macintyre
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Formatting time :/
>
> Steven Macintyre wrote:
> > I am unable to find out how to do this ... or what the format is
> "called"
> > bar zulu format
> >
> > I have standard 00:00:00 time stored ... and wish to display it
> as 00h00 ...
> > has anyone done this with php ... can you point me to right page
> etc ...
> >
> > What is that format called?
>
> http://php.net/date
>
> $time = date('H\hi', strtotime('00:00:00'));
>
> Or, if the input format is always the same, you could do it like
> so...
>
> $time = str_replace(':', 'h', substr('00:00:00', 0, 5));
>
> -Stut
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php