I am trying to format an integer column to a time column, but the values all end up as 12 like this:
12 12 12
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
If you don't want to deal with division and other math to get to the decimal time value, you can use the
TIME function which will handle it all for you:
Usage for your example
In Excel, times are stored as the fraction of a day. Therefore, each hour is 1/24 of a day. To convert integer hours to a time, divide the time by 24 and format as a date and/or time.
Excel stores dates as sequential serial numbers so that they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,447 days after January 1, 1900.
Numbers to the right of the decimal point in the serial number represent the time; numbers to the left represent the date. For example, the serial number 0.5 represents the time 12:00 noon.