Hi,
Friday, January 17, 2003, 11:16:53 AM, you wrote:
S> I have a PHP driven site that as a time schedule. Since the site isn't exactly
filled with very intellagent people who just LOVE to translate times and dates from a
weird format (Such as the
S> format used in MySQL), I'd like to take these
look at mysql's DATE_FORMAT() Let mysql do it for you, instead of PHP
- Original Message -
From: Stephen
To: PHP List
Sent: Thursday, January 16, 2003 7:16 PM
Subject: [PHP] Display Dates in English o_O
I have a PHP driven site that as a time schedule. Since the site isn't exactly fille
start with http://php.net/strtotime and http://php.net/date
OR
For the 24hr time to 12hr time conversion, something like:
= 12) { $suffix = 'pm'; } else { $suffix = 'am'; }
if($h > 12) { $h = $h - 12; }
echo "{$h}:{$m}{$suffix}";
?>
Untested code of course, but it should do the job, and wou
3 matches
Mail list logo