## Purpose

## Return value

## Syntax

`=SECOND(serial_number)`

*serial_number*- A valid time in a format Excel recognizes.

## How to use

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, and second inputs, use the TIME function.

### Examples

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

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

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

`=SECOND(A1) // returns 36`

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. *

### Fractional seconds

One notable limitation of the SECOND function is that it *rounds* fractional seconds to the nearest second. You can see this behavior in the worksheet below. The SECOND function is configured to extract seconds from the times in column C, which are recorded in hundredths of a second. During this operation, the fractional part of the number is lost when it is rounded:

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

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

For a detailed explanation of this formula, see Time in hundredths of a second.