Re: Displaying 2 digit minutes/seconds

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

 




On Aug 20, 2009, at 2:38 PM, Ashley Sheridan wrote:

What's wrong with using the date() function? You can have it output any
sort of format you wish. So, getting a 2 digit time in
hours:minutes:seconds you would put:

date("H:i:s");

Thanks, Ash. I had tried that before but I couldn't find a way to make it display in 12 hour time, so I went with the other method. I guess I didn't look hard enough. =;)

This works:

echo (date("g:i A"));

Frank

--
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