
What does the SECOND function do?
The SECOND function in Excel returns the number of seconds from a time value. It extracts a numeric value from 0 to 59 from a given timestamp, ignoring hours and minutes.
This function is useful when parsing time data, working with logs, event timestamps, and other tasks that require precise time analysis.
SECOND function syntax
=SECOND(time)
- time — date or time from which to extract seconds. This can be a cell reference or a function that returns time.
SECOND formula examples
=SECOND(A1)
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Value | HOUR | MINUTE | SECOND |
| 2 | 12:45:27 | 12=HOUR(A2) | 45=MINUTE(A2) | 27=SECOND(A2) |
| 3 | 14:32:45 | 14=HOUR(A3) | 32=MINUTE(A3) | 45=SECOND(A3) |
| 4 | 10/22/2026 08:15:00 | 8=HOUR(A4) | 15=MINUTE(A4) | 0=SECOND(A4) |
| 5 | 0.5 (number) | 12=HOUR(A5) | 0=MINUTE(A5) | 0=SECOND(A5) |
| 6 | 2:30 PM | 14=HOUR(A6) | 30=MINUTE(A6) | 0=SECOND(A6) |
| 7 | 25:10:05 (duration) | 1=HOUR(A7) | 10=MINUTE(A7) | 5=SECOND(A7) |
Each function takes its own part of the time. The date part is ignored, and a duration over 24 hours loses its whole days: 25:10:05 gives HOUR 1. SECOND is always between 0 and 59.
If cell A1 contains the time 12:45:27, the result will be 27.
=SECOND(NOW())
Returns the current seconds from the system time.
=SECOND(TIME(2, 15, 49))
| A | B | |
|---|---|---|
| 1 | Formula | Result |
| 2 | =SECOND(TIME(2,15,49)) | 49=SECOND(TIME(2,15,49)) |
| 3 | =SECOND(TIME(0,0,75)) | 15=SECOND(TIME(0,0,75)) |
| 4 | =TIME(0,0,75)*86400 | 75=TIME(0,0,75)*86400 |
| 5 | =SECOND("0:01:30") | 30=SECOND("0:01:30") |
| 6 | =ROUND("0:01:30"*86400,0) | 90=ROUND("0:01:30"*86400,0) |
TIME builds a time from parts; the extraction functions take them back. To get the total, not the part, multiply: minutes = A*1440, seconds = A*86400.
The result will be 49.
SECOND features and limitations
If you pass text representing time to the function, Excel will automatically try to convert it to time format. If the passed value is not recognized as time, the result will be an error.
Other date and time functions in Excel
TIMEVALUE, TIME, YEAR, DATE, DATEVALUE, EDATE, DAY, WEEKDAY, YEARFRAC, EOMONTH, MONTH, MINUTE, WEEKNUM, WORKDAY, DATEDIF, TODAY, NOW, HOUR, NETWORKDAYS
Like the article? Help its author! Buy !SEMTools, it has lots of useful instruments to process text data.