Excel Insert Time with Seconds: Guide to Custom Formatting
In this article
To insert the current time with seconds in Excel, use the keyboard shortcut Ctrl + Shift + ; (semicolon) to enter the time, then go to the Home tab, open the Number Format dropdown, select More Number Formats, and choose a time format that includes seconds (e.g., 13:30:55). Because Excel's default time shortcut often only displays hours and minutes, manual formatting is required to make the seconds visible.
Excel handles time as a fraction of a 24-hour day. When you enter a time, Excel stores a decimal value behind the scenes. The way that value is displayed—whether it shows just the hour, the minute, or the precise second—is entirely dependent on the cell's formatting. If you enter a time and the seconds are missing, they are usually still there in the data; they are simply hidden by the default display settings. This guide covers how to enter time, how to force the display of seconds, and how to use functions for dynamic time tracking.
What You'll Need
- A computer with Microsoft Excel installed (Windows or macOS).
- A keyboard with a semicolon key.
- Basic familiarity with the Excel Ribbon interface.
Step-by-Step
- Select the Target Cell: Click on the cell or highlight the range of cells where you want the time to appear. If you are creating a time-log column, it is more efficient to highlight the entire column first so that the formatting applies to all future entries.
- Insert the Current Time: Press Ctrl + Shift + ; (semicolon) on your keyboard. This is the static timestamp shortcut. It inserts the exact time of the moment you press the keys. Note that this value will not change unless you manually edit it.
- Open the Format Cells Menu: With the cell still selected, right-click the cell and select Format Cells... from the context menu. Alternatively, you can navigate to the Home tab on the Ribbon, locate the Number group, click the dropdown menu (which likely says "General" or "Time"), and select More Number Formats... at the bottom of the list.
- Navigate to Custom Formatting: In the Format Cells dialog box, ensure the Number tab is selected. In the Category list on the left side, scroll down and click on Custom. This allows you to define exactly how the time is displayed beyond the standard presets.
- Define the Time Code: In the Type input box, delete whatever is currently there and type the following code:
hh:mm:ss.hhrepresents the hours (with a leading zero for single digits).mmrepresents the minutes.ssrepresents the seconds.
hh:mm:ss AM/PMinstead. - Apply and Confirm: Click the OK button. The cell will now update to show the time including the seconds.
- Testing the Input: To ensure it works for manual entries, type a time manually into a cell using the format
14:05:32and press Enter. Because you have already set the cell format tohh:mm:ss, Excel will recognize and display the seconds immediately.
Common Mistakes
One of the most frequent errors is confusing the NOW() function with the keyboard shortcut. If you type =NOW() into a cell, Excel will display the current date and time. However, this is a volatile function, meaning the time will update every single time the worksheet recalculates or you press F9. If you are trying to create a timestamp for a specific event (like a log of when a task was completed), using =NOW() is a mistake because your timestamps will all change to the current time every time you open the file. Always use Ctrl + Shift + ; for static records.
Another common mistake is entering time without colons. If you type 123045 into a cell, Excel treats this as a large whole number, not a time. You must use colons (e.g., 12:30:45) for Excel to recognize the input as a time value. If you have a large dataset of numbers that should be times, you cannot simply change the format to hh:mm:ss; you will need to use a formula to convert those numbers into actual Excel time decimals first.
Users also often forget that the mm code is used for both months and minutes. In the Custom Format menu, Excel is smart enough to know that if mm follows hh (hours), it means minutes. However, if you use mm by itself or following a day/year code, Excel will display the month. Always ensure your custom string follows the hh:mm:ss sequence to avoid displaying the current month in your time column.
Tips
For those who need to track elapsed time that exceeds 24 hours (such as a total of hours worked over a week), the standard hh:mm:ss format will fail. Once the total hits 24 hours, Excel resets the clock to zero. To fix this, use the square bracket notation in the Custom Format box: [h]:mm:ss. The square brackets tell Excel to accumulate the hours rather than resetting them at the 24-hour mark.
If you find yourself frequently inserting timestamps, consider creating a simple Macro. While the keyboard shortcut is fast, a Macro can be assigned to a custom button on your Quick Access Toolbar, allowing you to insert a formatted time with a single click. This is particularly useful for users who find the three-key shortcut cumbersome.
To quickly apply the "seconds" format to a large block of existing data, use the Format Painter. Select a cell that is already correctly formatted to show seconds, click the Format Painter icon (the paintbrush) on the Home tab, and then click and drag across all the other cells you wish to format. This is significantly faster than selecting ranges and opening the Format Cells menu repeatedly.
Troubleshooting
The cell shows hashtags (#######) instead of the time: This is the most common display issue in Excel. It does not mean your data is wrong; it means the column is too narrow to display the full time string (especially after you add the seconds). To fix this, hover your mouse over the right border of the column header and double-click to auto-fit the width, or click and drag the border to the right.
The shortcut Ctrl + Shift + ; doesn't seem to work: First, check if you have another software program running in the background (such as a screen recorder or a system utility) that has hijacked that specific keyboard shortcut. Second, ensure you are pressing the keys simultaneously. On some international keyboard layouts, the semicolon is in a different position or requires a different modifier key. If the shortcut fails, you can manually type the time, but you will still need to apply the hh:mm:ss formatting to see the seconds.
The time updates every time I enter data elsewhere: You have likely used the =NOW() or =TIME() function instead of the static shortcut. To fix this, select the cell, copy it (Ctrl + C), right-click the cell, and select Paste Values. This removes the formula and leaves only the static time result, preventing it from updating automatically.
The seconds are showing as 00 even though I entered them: This usually happens if the data was imported from a CSV or another software that stripped the precision of the time. If the source data only provided hours and minutes, Excel cannot "invent" the seconds; it will simply display 00. Check your source data to ensure the seconds were captured at the moment of recording.
Frequently Asked Questions
Can I insert the date and time with seconds in one cell?
Yes. Use the shortcut Ctrl + ; (semicolon), press Space, and then press Ctrl + Shift + ;. Then, apply the custom format mm/dd/yyyy hh:mm:ss to see both the date and the precise time.
Is there a way to make the seconds tick in real-time?
Excel does not have a built-in "live clock" feature. To make seconds tick, you would need to write a VBA script using the Application.OnTime method to refresh the cell every second. This is not recommended for large sheets as it can significantly slow down performance.
Does the format change if I save the file as a CSV?
Yes. CSV files are plain text and do not store formatting. When you save as a CSV, Excel saves the value. When you reopen the CSV, Excel will apply its default time format (usually without seconds). You will need to re-apply the hh:mm:ss custom format every time you open the file in Excel.
How do I subtract two times that include seconds?
Subtract the start time from the end time using a simple formula (e.g., =B2-A2). To ensure the result shows the correct duration including seconds, format the result cell as [h]:mm:ss.
Why does my time look like a decimal number (e.g., 0.54321)?
This is the raw way Excel stores time. 0.5 represents 12:00 PM (half of a day). To fix this, simply change the cell format from "General" to "Time" or use the Custom hh:mm:ss format described in the steps above.