SECOND

Purpose

This function returns the seconds of a timestamp.

Syntax

second::=

Usage Notes

  • The optional second parameter defines the number of digits after the decimal point.
  • This function can also be applied on strings, in contrast to function EXTRACT.
  • For data type TIMESTAMP WITH LOCAL TIME ZONE this function is calculated within the session time zone.

Example

SELECT SECOND(TIMESTAMP '2010-10-20 11:59:40.123', 2);