SELECT
Timestampdiff (Timestamp (' 2013-12-30 20:30:30 ')-timestamp (' 2001-09-26 15:24:23 ')) as "Interval year",
Timestampdiff (+, char (timestamp (' 2013-12-30 20:30:30 ')-timestamp (' 2001-09-26 15:24:23 ')) as "Interval quarter",
Timestampdiff (+, char (timestamp (' 2013-12-30 20:30:30 ')-timestamp (' 2001-09-26 15:24:23 ')) as "Interval Month",
Timestampdiff (+, char (timestamp (' 2013-12-30 20:30:30 ')-timestamp (' 2001-09-26 15:24:23 ')) as "Interval Week",
Timestampdiff (+, char (timestamp (' 2013-12-30 20:30:30 ')-timestamp (' 2001-09-26 15:24:23 ')) as "Interval Day",
Timestampdiff (8, char (timestamp (' 2013-12-30 20:30:30 ')-timestamp (' 2001-09-26 15:24:23 ')) as "at Interval",
Timestampdiff (4, char (timestamp (' 2013-12-30 20:30:30 ')-timestamp (' 2001-09-26 15:24:23 ')) as "interval Division",
Timestampdiff (2, char (timestamp (' 2013-12-30 20:30:30 ')-timestamp (' 2001-09-26 15:24:23 ')) as "interval seconds"
From SYSIBM. SYSDUMMY1;
DB2 How to calculate the difference of two time months. such as 2015-10-10 and 2014-1-12