Exemple DATEADD
DATEADD
DATEADD (28 DAY TO CURRENT_DATE)
DATEADD (-6 HOUR TO CURRENT_TIME)
DATEADD (MONTH, 9, DATEOFCONCEPTION)
DATEADD (-38 WEEK TO DATEOFBIRTH)
DATEADD (MINUTE, 90, CAST('NOW' AS TIME))
DATEADD (? YEAR TO DATE '11-SEP-1973')
SELECT
CAST(DATEADD(-1 * EXTRACT(MILLISECOND FROM ts) MILLISECOND TO ts) AS VARCHAR(30)) AS t,
EXTRACT(MILLISECOND FROM ts) AS ms
FROM (
SELECT TIMESTAMP'2014-06-09 13:50:17.4971' as ts
FROM RDB$DATABASE
) a
T MS ------------------------------------ 2014-06-09 13:50:17.0000 497.1