> Use 24 hour time internally. Whether you then display 24 hour or > 12 hour time with AM/PM is only a matter of the display logic That's what I do with my clocks. Even using minutes for long-range (years) calendar functions such as alarms and intervals. Internally only seconds and minutes, and the display is updated after division by 1440 for days and a look-up table for day name/date/month. The maths and manipulations are so much easier using just one basic unit The complications of hours, 12/24, days, weeks, and years need only be attended to for display and are a handicap for working out how many minutes are between 10:31am 15th April and 11:07pm February 4th and when to set off regular alarms in that interval -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist