To format time in Excel, select the cells you want to change, right-click and choose Format Cells, then select Time from the Category list and pick your preferred format. This process ensures that Excel recognizes your data as a time value rather than plain text, allowing you to perform mathematical calculations like adding hours or calculating duration.

Proper time formatting is essential for anyone managing timesheets, project schedules, or logs. Because Excel stores time as a fraction of a 24-hour day (for example, 12:00 PM is stored as 0.5), simply typing numbers into a cell often leads to errors. By applying the correct format, you tell Excel exactly how to display that decimal value to the human eye.

What You'll Need

  • Microsoft Excel (Desktop, Web, or Mobile version)
  • A dataset containing time entries or a blank sheet to start a new log

Step-by-Step

  1. Select Your Data: Click on the individual cell, click and drag to highlight a range, or click the column letter (e.g., Column B) to select the entire column that contains your time data.
  2. Open the Format Cells Menu: Right-click on the selected area and select Format Cells from the context menu. Alternatively, you can press Ctrl + 1 (Windows) or Command + 1 (Mac) on your keyboard. Note that menu labels may differ slightly depending on your version of Excel or region.
  3. Choose the Time Category: In the Format Cells dialog box, ensure you are on the Number tab. In the Category list on the left, click on Time.
  4. Select a Preset Format: On the right side of the window, you will see a list of common formats (e.g., 1:30 PM, 13:30, or 1:30:55 PM). Click the one that matches your needs and click OK.
  5. Create a Custom Time Format (Optional): If the presets do not meet your requirements, click Custom at the bottom of the Category list. In the Type box, you can manually enter a code:
    • h:mm for 24-hour time (e.g., 14:30)
    • h:mm AM/PM for 12-hour time (e.g., 2:30 PM)
    • [h]:mm:ss for elapsed time that exceeds 24 hours (e.g., 25:30:00)
    Click OK to apply the custom code.
  6. Verify the Entry: Type a time into the cell (e.g., "8:00") and press Enter. If the cell updates to your chosen format, the setting is active.

Common Mistakes

  • Typing Time as Text: Entering time as "8am" or "8 o'clock" instead of "8:00 AM" causes Excel to treat the entry as text. You cannot perform math on text cells. Always use the colon (:) to separate hours and minutes.
  • Ignoring the 24-Hour Limit: By default, Excel resets the clock to zero after 24 hours. If you are summing a column of hours for a payroll sheet and the total is 26 hours, Excel might display "2:00" because it sees one full day and two remaining hours.
  • Confusing Time with Duration: A "Time of Day" (e.g., 9:00 AM) is different from a "Duration" (e.g., 9 hours). Using a Time of Day format for a duration can lead to confusing displays when the total exceeds 24 hours.

Tips

  • Quick Entry: To quickly enter the current time in a cell, press Ctrl + Shift + : (colon). This creates a static timestamp that does not change.
  • The Square Bracket Trick: Whenever you are calculating totals (like a weekly timesheet), always use the custom format [h]:mm. The square brackets tell Excel to "accumulate" the hours rather than resetting at 24.
  • Consistent Input: To avoid errors, pick one input method (either 24-hour or 12-hour with AM/PM) and stick to it throughout the entire column.

Troubleshooting

If your time formatting is not working as expected, try these steps in order:

  1. Check for Text Formatting: If the time stays aligned to the left of the cell, Excel thinks it is text. Select the cell, go to the Home tab, and change the dropdown menu from Text to General or Time. You may need to double-click the cell and press Enter to "refresh" the value.
  2. Look for Hash Symbols (####): If the cell displays #######, the column is too narrow to show the formatted time. Hover your mouse over the right border of the column header and double-click to auto-fit the width.
  3. Clear Formatting: If a cell is behaving erratically, go to the Home tab, click Clear (the eraser icon), and select Clear Formats. Then, re-apply the time format from scratch.
  4. Verify Regional Settings: If you are using a comma instead of a period or a different time separator, check your computer's system region settings, as Excel inherits these defaults.

Frequently Asked Questions

How do I subtract one time from another to find the duration?

Use a simple subtraction formula: =End_Time - Start_Time. Ensure the resulting cell is formatted as Time or a custom duration format like [h]:mm.

Why does my total time reset to zero after 24 hours?

This happens because Excel treats time as a clock. To fix this, go to Format Cells > Custom and change the format to [h]:mm:ss. The brackets prevent the reset.

Can I format a cell to show both date and time?

Yes. In the Format Cells menu, select Date and look for the options that include both the date and time, or use the Custom code mm/dd/yyyy h:mm AM/PM.

How do I convert a decimal number to time?

Since Excel treats 1 day as the number 1, a decimal like 0.5 is 12 hours. Simply select the cell with the decimal and change the format to Time using the steps outlined above.

What is the difference between "h" and "hh" in custom formatting?

The single h displays the hour without a leading zero (e.g., 9:00), while hh forces a leading zero for single-digit hours (e.g., 09:00).