Example 1
Seconds from a time
B2 =SECOND(A2)
Result: 30
Only the seconds part is returned.
B2 =SECOND(A2) returns 30
Returns the seconds of a time or timestamp as a whole number from 0 to 59.
Syntax
=SECOND()
All versions of Excel.
Try it
Edit the formula in B2 or change the inputs. The sheet recalculates as you type.
B2 =SECOND(A2) returns 30
SECOND returns the seconds part of a time as a whole number from 0 to 59. =SECOND(TIME(14,45,30)) returns 30. It ignores the hour and the minute. SECOND completes the set with HOUR and MINUTE.
serial_number is the time. It can be a real time value, a timestamp that includes a date, or text that Excel reads as a time. The date part is ignored. Text that isn't a valid time, such as "10:15:99", returns #VALUE!.
SECOND returns the seconds within the current minute, so it never goes above 59. A stopwatch time of 1:02:03 returns 3. To convert a whole time to seconds, combine the three parts:
=HOUR(A2)*3600+MINUTE(A2)*60+SECOND(A2)
For 1:02:03 that is 3,600 + 120 + 3 = 3,723. For the gap between two timestamps, subtract them and multiply by 86,400, the number of seconds in a day: =(B2-A2)*86400.
=SECOND(A2)=0 is true on the minute mark.=TIME(HOUR(A2),MINUTE(A2),0).=SUMPRODUCT(--(SECOND(A2:A100)=0)) counts events that fall exactly on a minute.Excel stores times as fractions of a day, and fractions of a second can't always be stored exactly. Excel rounds to the nearest whole second before it reads the value, so 10:15:41.6 returns 42. If you subtract timestamps and then read the seconds, tiny floating-point differences can occasionally tip the result by one second. Round the time first with =ROUND(A2*86400,0)/86400 when this matters.
Text times work without conversion: =SECOND("10:15:42") returns 42. If a whole column of imported times is text, convert it with TIMEVALUE first and work from real time values.
SECOND discards the date and the larger parts of the time. If your analysis spans several days or hours, include them in your grouping key.
"10:15:42". A decimal is read as a fraction of a day.Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
B2 =SECOND(A2)
Result: 30
Only the seconds part is returned.
B2 =SECOND(A2) returns 30
Example 2
B2 =SECOND(A2)
Result: 42
SECOND reads text that Excel recognises as a time.
B2 =SECOND(A2) returns 42
Example 3
B2 =HOUR(A2)*3600+MINUTE(A2)*60+SECOND(A2)
Result: 3723
1 hour is 3,600 seconds, 2 minutes is 120 and 3 seconds is 3, which adds to 3,723.
B2 =HOUR(A2)*3600+MINUTE(A2)*60+SECOND(A2) returns 3723
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 2
In B2, return the seconds part of the lap time in A2. Fill it down to B4.
Answer in B2, then it fills down to B4.
#VALUE!.Use `=SECOND(A2)`. It returns the seconds part, from 0 to 59.
Use `=HOUR(A2)*3600+MINUTE(A2)*60+SECOND(A2)`, or `=A2*86400` for a duration stored as a time value.
Times are stored as fractions of a day, so a calculated time can sit a tiny amount below a whole second. Round the time to the nearest second first.
Yes. It ignores the date and returns the seconds of the time part.
Tracks take you from the basics to modelling, one graded exercise at a time.