SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual—523725-004
9-140
SECOND Function
SECOND Function
The SECOND function converts a TIME or TIMESTAMP expression into an INTEGER 
value in the range 0 through 59 that represents the corresponding second of the hour. 
SECOND is an SQL/MX extension. 
datetime-expression 
is an expression that evaluates to a datetime value of type TIME or TIMESTAMP. 
See Datetime Value Expressions on page 6-40.
Examples of SECOND
•
Return an integer that represents the second of the hour from the 
SHIP_TIMESTAMP column: 
SELECT start_date, ship_timestamp, SECOND(ship_timestamp)
FROM persnl.project
WHERE projcode = 1000;
Start/Date Time/Shipped (EXPR) 
---------- -------------------------- ----------- 
1996-04-10 1996-04-21 08:15:00.000000 .000000 
SECOND (datetime-expression)










