Re: Displaying 2 digit minutes/seconds

From: Date: Thu, 20 Aug 2009 22:49:08 +0000
Subject: Re: Displaying 2 digit minutes/seconds
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-297043@lists.php.net to get a copy of this message
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

« previous php.general (#297043) next »