SECOND Function [Date and Time]

Returns a number from 0 to 59 corresponding to the second component of the given date/time value.

Syntax

SECOND datetime-expression )

Parameters

Parameter

Description

datetime-expression

The date/time value.

Returns

SMALLINT

Example

The following statement returns the value 5:

SELECT SECOND( '1998-07-13 08:21:05' ) FROM iq_dummy

Standards and Compatibility

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Compatible with Adaptive Server Enterprise.

Related reference
CAST Function [Data Type Conversion]
CONVERT Function [Data Type Conversion]
HOURS Function [Date and Time]
MINUTES Function [Date and Time]
MONTHS Function [Date and Time]
REPLACE Function [String]
WEEKS Function [Date and Time]
YEAR Function [Date and Time]
YEARS Function [Date and Time]