Neoview SQL Reference Manual (R2.4)

602007-12-21:09:00:00.00002007-10-102500
602007-10-21:08:10:00.00002007-08-213000
302007-10-21:10:15:00.00002007-09-214000
302007-10-28:09:25:01.11112007-09-285000
Suppose that the CURRENT_TIMESTAMP is 2000-01-06 11:14:41.748703. Find the number
of days, hours, minutes, seconds, and fractional seconds in the difference of the current
timestamp and the SHIP_TIMESTAMP in the PROJECT table:
SELECT projcode,
(CURRENT_TIMESTAMP - ship_timestamp) DAY(4) TO SECOND(6)
FROM samdbcat.persnl.project;
Project/Code (EXPR)
------------ ---------------------
1000 1355 02:58:57.087086
2000 1264 02:43:57.087086
2500 1111 02:13:57.087086
3000 1172 03:03:57.087086
4000 1172 00:58:57.087086
5000 1165 01:48:55.975986
--- 6 row(s) selected.
Expressions 249