P is for Practical | |
PerlMonks |
Re: Converting 24 hour time back into 12 hourby atcroft (Abbot) |
on Nov 07, 2004 at 00:23 UTC ( [id://405826]=note: print w/replies, xml ) | Need Help?? |
Try inserting this after that line: $hour = ($hour > 12 ? $hour % 12 : $hour); Hope that helps. (By the way, 24-hour time is just as valid as 12-hour time, and simpler, lacking the added complication of having to specify AM/PM. ;)
In Section
Seekers of Perl Wisdom
|
|