Contact

SECOND Function (OpenOffice Calc)

Date & Time Intermediate OpenOffice Calc

Learn the SECOND function in Apache OpenOffice Calc: Determines the sequential number of the second of a minute (0-59) for the time value.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Availability and version history

  • Introduced: Documented by Apache OpenOffice 4.1.16; original introduction not established.
  • Availability: Supported in Apache OpenOffice 4.1.16, verified against its function registry. This identifies a supported release, not a final working version.
  • Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
  • Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.

SECOND extracts the second within a minute. It does not return total elapsed seconds and, in the pinned OpenOffice implementation, it rounds the fractional day to a whole second before taking the remainder modulo 60. This differs from treating the visible fractional seconds as a value to truncate.

Syntax and arguments

=SECOND(time_value)

One numeric time or date-time is required. The callback removes the whole-day portion, computes approximate floor(fraction*86400+0.5), and returns its remainder modulo 60. Whole-second inputs yield ordinary second values 0 through 59. Fractional-boundary expectations below follow this source expression and are not new native tests. Examples use English function names and semicolon argument separators.

Reproducible examples

Formula Expected result
=SECOND(TIME(14;30;45)) 45
=SECOND(TIME(0;0;0)) 0
=SECOND(TIME(0;0;90)) 30
=SECOND(59.25/86400) 59
=SECOND(59.75/86400) 0
=SECOND(86399.75/86400) 0

The first formula preserves the original example and result. Its historical comparable LibreOffice 25.2 check was not an OpenOffice test. New calendar and time results are independently checked reference expectations, not captured native cells. Calendar dates use ISO notation and clock results use HH:MM:SS to avoid ambiguous display conventions.

Practical worksheet: extract seconds while preserving the timestamp

Enter =TIME(8;15;5), =TIME(12;0;30) and =TIME(17;45;59) in A2:A4. In B2 enter =SECOND(A2) and fill down. Results are 5, 30 and 59. In C2 enter =B2>=30, giving FALSE, TRUE and TRUE. This is a chosen within-minute classification, not a measure of event duration.

Keep column A unchanged. Replacing a complete timestamp with the second field would collapse times from different minutes, hours and dates into the same small set of integers. The derived column is useful only with its original context.

Advanced applications

Test rounding on either side of a minute. For 59.25/86400, SECOND is 59 in the source model. For 59.75/86400 it is 0 because rounding reaches the next minute. MINUTE of the latter is 1. The returned zero does not say that the elapsed interval was zero seconds. Avoid claiming a fractional second value from an integer-component function.

Compute elapsed seconds from a difference. Let A2 be DATE(2026;10;15)+TIME(12;0;50), and B2 the same date plus TIME(12;1;10). (B2-A2)*86400 is mathematically 20 seconds, subject to floating-point rounding. SECOND(B2)-SECOND(A2) is 10-50=-40 and is not the elapsed time. Use ROUND on the duration only when the required unit is an intentional whole second.

Reconstruct whole-second clock time. For the stated whole-second inputs, TIME(HOUR(A2);MINUTE(A2);SECOND(A2)) recovers the time-of-day fraction. It discards any date and cannot preserve subsecond precision. Near midnight the source HOUR can reach 24 after rounding; TIME then wraps that reconstructed clock to midnight.

Errors, edge cases and troubleshooting

A numeric input is measured in days, so the bare number 45 is not a shorthand for 45 seconds. Use TIME(0;0;45) or 45/86400 to express that duration within a day. The two controls explain units; they do not certify all numeric-text coercions.

SECOND produces a component after rounding, not a stopwatch total and not the fractional remainder after removing a whole second. A time format showing decimals can display more information than the integer returned by SECOND. Keep the original serial if that precision is needed.

Date-time subtraction can accumulate small binary floating-point differences, so an independently exact 20-second interval may not display as exactly 20 before appropriate rounding. The guide does not invent a native error tolerance or prove exactness for every timestamp. Locale parsing, historical dates, file-format round trips and extreme serial values remain untested. Investigate upstream errors rather than replacing every unexpected component with zero.

Documentation and verification

See the Apache OpenOffice SECOND reference, 4.1.16 function resources and versioned date/time interpreter. Official source snapshots were retrieved October 13, 2026 and re-read for this guide. The calculations use an independent calendar and exact rational day-fraction model; no fresh native/headless application or GUI execution is claimed. First introduction and final functioning version remain unknown, separate from documented 4.1.16 support.