Neoview SQL Reference Manual (R2.4 SP2)
HOUR Function
The HOUR function converts a TIME or TIMESTAMP expression into an INTEGER value in the
range 0 through 23 that represents the corresponding hour of the day.
HOUR is a Neoview SQL extension.
HOUR (datetime-expression)
datetime-expression
is an expression that evaluates to a datetime value of type TIME or TIMESTAMP. See
“Datetime Value Expressions” (page 245).
Example of HOUR
Return an integer that represents the hour of the day from the SHIP_TIMESTAMP column in
the PROJECT table:
SELECT start_date, ship_timestamp, HOUR(ship_timestamp)
FROM persnl.project
WHERE projcode = 1000;
Start/Date Time/Shipped (EXPR)
---------- -------------------------- ------
2007-04-10 2007-04-21 08:15:00.000000 8
394 SQL Functions and Expressions