Previous Topic Next topic Print topic


HOUR

ANSI DB2 SQL/DS XDB
  X   X

The HOUR function is used to extract the hour part of a time or timestamp. The result is an integer between 0 and 24 (or null if time-expr evaluates to a null value). The format appears below:

HOUR(time-expr)

For example:

SELECT HOUR(starttime)
FROM tasks
Previous Topic Next topic Print topic