Formualizer Docs

SECOND

Extracts the second component (0 to 59) from a time or datetime serial.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=SECOND(serial_number)

Arguments

ArgumentTypeRequiredDefault
serial_numbernumberRequired—

Remarks

  • A date argument may be text holding a date or time ("10/26/1999", "1999-10-26 14:05"), read as its serial; text that is neither a number nor a date returns #VALUE!.
  • The integer date portion is ignored for second extraction.
  • The date portion, when present, is resolved with the workbook's date system.
  • Time is computed from the serial fraction and rounded to whole seconds.

Examples

Extract the component from a time with nonzero hours, minutes and seconds.

Formula =SECOND(TIME(14,35,27))

Expected result 27

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Read the time component from a serial that also includes a date.

Formula =SECOND(DATE(2024,2,29)+TIME(14,35,27))

Expected result 27

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Read the component at midnight.

Formula =SECOND(0)

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

An unrecognized time string cannot be converted to a serial.

Formula =SECOND("not a time")

Expected result #VALUE!

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Extract second from 15:30:45

Formula =SECOND(0.6463541667)

Expected result 45

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Extract second from exact noon

Formula =SECOND(0.5)

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

Can SECOND return 60 for leap seconds?

No. SECOND returns values from 0 to 59 based on spreadsheet serial-time interpretation.

Implementation

Engine source

On this page