One approach would be to have a field for a mode setting (12 or 24 hour). If the mode is 12-hour, then do something clever with the modulo operator (%).
As for the zero hour... I don't know. That's a placeholder the Roman system didn't use. One option might be to display "nulla."
Thanks for the nulla info I shall update the code to display N
I chose to use if rather than the switch statement as each if can be on one line. hmm thinking about it switch probbly could be to but when I first wrote this code using proper switch code layout it was well long.
Not sure how to use modulo to get it to display 12 hours instead of 24 but I shall have a try and see what happens.
Dale Carnegie:<br />"Most of the important things in the world have been accomplished<br />by people who have kept on trying when there seemed to be no hope at all."