Quote:
Originally Posted by Alibass
@msalman
Actually your code is for a 24 hour clock and works best that way. If you try and use it as a 12 hour clock then midnight is shown as 00:00:00 AM instead on 12:00:00 AM and noon is shown 00:00:00 PM instead of 12:00:00 PM
Find
Code:
if (h >= 12) {
h -= 12
am_pm = "P.M."
}
else {
am_pm = "A.M."
}
Replace (for 24 hour clock)
Code:
if (h >= 12) {
h <= 12
am_pm = ""
}
else {
am_pm = ""
}
|
Excellent, did the trick first time, thanks.