Converting from ordinary to decimal time
Created | Updated Sep 3, 2002
Converting between ordinary time and decimal time is a simple question of multiplication and addition.
You start with time on the form hh:mm:ss.t and a timezone. First convert to GMT. Then do a simple:
hh * 125/3 + mm * 25/36 + ss.t * 5/432
To go the other way, first divide by 125/3 for the number of hours, divide the remainder by 25/36 for the number of minutes, and divide that remainder again by 5/432 for the number of seconds.