RE: Formatting time :/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Stut,

Perfect!


Kind Regards,


Steven Macintyre
http://steven.macintyre.name
--

http://www.friends4friends.co.za


> -----Original Message-----
> From: Stut [mailto:stuttle@xxxxxxxxx]
> Sent: 02 January 2007 02:59 PM
> To: Steven Macintyre
> Cc: php-general@xxxxxxxxxxxxx
> Subject: Re:  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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux