hour

Return the hour

Syntax

hour(dt_expr)

Arguments

dt_expr A time expression.

Description

This function returns the hour component in the specified time expression as a number between 0 and 23.

Example

select hour(curtime()) as "Current Hour";

Current Hour
          17