ID EN
#Date and time

SECOND

Excel Functions

Get the Second as a number (0-59) from a Time

Syntax

EXCEL
=SECOND(serial_number)

Arguments

Parameter Description
serial_number A valid time in a format Excel recognizes.

Return Value

A number between 0 and 59

Details

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, a valid Excel time, or a text value Excel can interpret as a time (e.g. "7:45:30 PM"). The SECOND function does not convert time into seconds but rather extracts the seconds component from time. For example, given a time duration of 10 minutes (600 seconds) the SECONDS function will return 0 (zero), since seconds are zero in the time 10:00. This means the SECOND function will "reset" to 0 every 60 seconds (like a clock). To convert a time value into decimal seconds, see this example. To create a time value from scratch with separate hour, minute, an

Examples

Examples

When given the time "10:45:17 AM", the SECOND function will return 17:

EXCEL
=SECOND("10:45:17 AM") // returns 17
Examples

With the time "2:19:36" in cell A1, SECOND will return 36:

EXCEL
=SECOND(A1) // returns 36
Examples

The formula below demonstrates how the TIME function can be used to create the time 9:30:45 in Excel:

EXCEL
=TIME(9,30,45)
Examples

If we wrap the SECONDS function around the TIME function, we get 45, as expected:

EXCEL
=SECOND(TIME(9,30,45)) // returns 45
Fractional seconds

To extract fractional seconds while maintaining precision, you can use a formula like this:

EXCEL
=MOD(C5*1440,1)*60

See Also

HOUR MINUTE SECOND TIME