Re: Formatting time :/

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

 



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


[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