In Excel, times are stored as decimal numbers, where 0 is 00:00:00 and 1 is 24:00:00.
The integer component of the decimal represents a 24-hour period and is used to represent times greater than 23:59:59. When using this representation, it is useful to think of the integer component as the day on which the time occurs, with times less than 24:00:00 occurring on day zero. For example, 1.50 would be 36:00, or 12:00 on the second day.
In Excel, cells containing times may be formatted in various ways, for example, hh:mm, d hh:mm or h:mm AM/PM. Times may be given to the optimiser in any of the Excel time formats.
| hh:mm | [hh];mm | dd/mm/yyy hh:mm | d hh:mm | |
| 0.5 | 12:00 | 12:00 | 00/01/1900 12:00 | 0 12:00 |
| 1.5 | 12:00 | 36:00 | 01/01/1900 12:00 | 1 12:00 |
Note here that if using the dd/mm/yyy hh:mm format, day zero occurs on 00/01/1900, which is Excel’s earliest recognised date.