Category: FUNCTION | Updated: 2026-11-22
How to Use the SECOND Function in Google Sheets | Extract the Second from a Time
How to Use the SECOND Function
The SECOND function extracts the second component of a specified time value as an integer from 0 to 59. It is useful for analyzing system logs, sports timing data, and other workflows that require second-level precision.
Syntax
=SECOND(time)
- time: A cell reference containing a time value, a formula, or a serial number from which to extract the second.
Examples
Here are examples of extracting seconds from various time inputs in Column A.
| A (Target Time) | B (Formula) | Result | Notes |
|---|---|---|---|
| 10:20:45 | =SECOND(A2) |
45 | Extracts 45 from 10:20:45 |
| 08:30 | =SECOND(A3) |
0 | Returns 0 when seconds are omitted |
| 2026/11/22 15:00:08 | =SECOND(A4) |
8 | Extracts 8 from a date-time value |
=TIME(1, 2, 33) |
=SECOND(A5) |
33 | Extracts 33 from the result of TIME |
Common Errors and Tips
- Unexpected display due to cell formatting: If the result cell is formatted as “Date” or “Time”, an integer like
45will be displayed as a serial date (day 45). Make sure the cell format is set to Automatic or Number. #VALUE!error: Occurs if the referenced text cannot be parsed as a valid time (e.g.,"45 sec"or strings containing full-width spaces).- Fractional seconds (milliseconds): Even if a timestamp includes milliseconds like
12:00:15.800,SECONDtruncates the decimal portion and returns15.
Frequently Asked Questions
Q. What does SECOND return for a time without seconds, such as "12:30"?
A. Times without explicit seconds are treated as having "00" seconds internally, so SECOND returns "0".
Q. Can SECOND extract milliseconds (fractions of a second)?
A. No, SECOND only returns an integer from 0 to 59 and truncates milliseconds. To display milliseconds, use the TEXT function with a format like "ss.000".