SECOND()

Second of minute from Duration

Returns the number of seconds explicitly specified if identifiable, or 0 if a second is not found.

Sample usage

SECOND("007:14:21") returns 21

SECOND(TIMENOW() - "00:00:00") returns seconds since the top of the minute; the current second of the minute. See also: TIMENOW()

Seconds in Duration

SECOND() merely extracts the seconds component from a Duration value; it does not compute the number of seconds the Duration value represents in total. To compute the total seconds comprising a Duration value, use TOTALSECONDS().

Common problems

SECOND(NOW()) (or any DateTime or Time value in place of NOW()) causes Expression Assistant to complain, Parameter 1 of function SECOND is of the wrong type. The argument must be a Duration value, not a DateTime or Time value. To fix, convert a DateTime value to a Time value with TIME(), then subtract a zero time to convert a Time value to a Duration value: SECOND(TIME(NOW()) - "00:00:00"). See also: NOW(), TIME()

Syntax

SECOND(duration)

  • duration - A Duration value.

Notes

SECOND(...) is equivalent to (NUMBER(INDEX(SPLIT(TEXT(...), ":"), 3)) + 0) when ... is a Time value. See also: INDEX(), NUMBER(), SPLIT(), TEXT()

See also

Date and time expressions

HOUR()

MINUTE()

Was this helpful?
How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
false