Excel - SECOND Function



SECOND Function

The Excel SECOND function isolates the seconds component of a time value. It retrieves an integer number ranging from 0 (zero) to 59. The SECOND function is categorized under the Date & Time function in Excel. For instance, you may extract the second component from the current time, providing the supplied date or from a result of the other complex expression by simply employing the SECOND function.

You may consistently use the TIME function that combines the hour, minutes, and seconds to generate a new time value,

Compatibility

This advanced Excel function is compatible with the following versions of MS-Excel

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016
  • Excel 2013
  • Excel 2010
  • Excel 2007

Syntax

The syntax of the SECOND function is as follows −

=SECOND(serial_number)

Arguments

You can use the following arguments with the SECOND function −

Argument Description Required/ Optional
Serial_number

It specifies a time from where the seconds are to be retrieved.

Times would be written as −

  • Text strings enclosed with quotation marks (E.g. "8:30 AM")
  • Decimal numbers
  • Resulting values of other computed formulas or functions
Required

Points to Remember

  • Time values are a part of a date serial number and are denoted by a decimal number.
  • If the non-numeric value is specified in the Serial_number, then the SECOND function will retrieve the #VALUE! Error.
  • If the Serial_number contains the negative value, then the SECOND function returns the #NUM! error.

Examples of SECOND Function in Excel

Practice the following examples to get the master proficiency of the SECOND function in Excel.

Example 1: How to use the SECOND Function in Excel?

In this example, we will extract the second components from the given serial number range using the SECOND function in Excel.

Step 1 − First, assume the sample dataset consists of the two columns titled "Serial Number" and "Second".

Examples of the SECOND Function in Excel1

Step 2 − After that, select the cell range C2:C7 and enter the formula =SECOND(B2) in the formula bar like this.

Examples of the SECOND Function in Excel2

Then, press "Ctrl+Enter" to compute the SECOND function and populate the result in the selected cell range.

Step 3 − Furthermore, you may also combine the SECOND function with the TIME function. You select cell C8 and write the expression =SECOND(TIME(4,50,29)).

Examples of the SECOND Function in Excel3

After that, hit the Enter tab to get the result. Therefore, the given expression yields a result of 29 representing the seconds.

Example 2

If the non-numeric value is specified in the Serial_number, then the SECOND function will retrieve the #VALUE! Error.

Solution

Open an example 2 worksheet and enter the formula =SECOND("serial") in the C3 cell.

Examples of the SECOND Function in Excel4

After pressing the Enter tab, the SECOND function will retrieve the #VALUE! error.

Examples of the SECOND Function in Excel5

Example 3

If the Serial_number contains the negative value, then the SECOND function returns the #NUM! error.

Solution

You may navigate to the "example 3" worksheet, place the cursor on the A2 cell, double-click, type the formula =SECOND(-0.87), and hit the Enter tab.

Examples of the SECOND Function in Excel6

Examples of the SECOND Function in Excel7

Download Practice Sheet

You can download and use the sample data sheet to practice the SECOND function.

Advertisements