Purpose
Return value
Arguments
- serial_number - A valid time in a format Excel recognizes.
Syntax
Usage notes
The SECOND function extracts the second component from a time as a number between 0-59. For example, given a time of "12:15:01", SECOND will return 1. The SECOND function takes just one argument, serial_number, which must be a valid Excel date or a valid Excel time.
Time can be supplied to the SECOND function as text (e.g. "7:45:30 PM") or as decimal numbers (e.g. 0.5, which equals 12:00 PM). To create a time value from scratch with separate hour, minute, and second inputs, use the TIME function.
The SECOND function will "reset" to 0 every 60 seconds (like a clock). For example, given a time duration of 10 minutes, which is 600 seconds, the SECONDS function will return 0 (zero). To work with seconds values larger than 60, use a formula to convert time to decimal seconds.
Examples
When given the time "10:45:17 AM", the SECOND function will return 17:
=SECOND("10:45:17 AM") // returns 17
The formula below demonstrates how the TIME function can be used to create the time 9:30:45 in Excel:
=TIME(9,30,45)
If we wrap the SECONDS function around the TIME function, we get 45, as expected:
=SECOND(TIME(9,30,45)) // returns 45
Note: Excel stores dates as serial numbers and times as decimal numbers. For example, the time 12:00 PM is equal to 0.5 (one half-day), and the date Jan 1, 2000 12:00 PM is equal to the serial number 32526.5 in Excel.