SECOND function [Date and time]

Returns a second of the given date.

Syntax
SECOND( datetime-expression )
Parameters
  • datetime-expression   The datetime value.

Returns

SMALLINT

Remarks

Returns a number from 0 to 59 corresponding to the second component of the given datetime value.

Standards and compatibility
  • SQL/2003   Vendor extension.

Example

The following statement returns the value 25.

SELECT SECOND( '1998-07-13 21:21:25' );