*   *ID* C05ARITH DBCMD    changed on 1992-09-28-13.21.31 by ADMIN     *
file connect ( kern test sqlmode db2 !
create table t ( sd date, st time, sts timestamp)!
insert into t values ('19800824', '00101520', '19800824101520456000')!
select sd + 123456789 into :a from t!
select sd + 12345678  into :a from t!
select sd + 12341032  into :a from t!
select sd + 12341002  into :a from t!
select sd - 12341002  into :a from t!
select st + 1456789 into :a from t!
select st + 145678  into :a from t!
select st + 141002  into :a from t!
select st - 141002  into :a from t!
select sts + 123456789012345678901 into :a from t!
select sts + 12345678901234567890  into :a from t!
select sts + 12345678901234.567890 into :a from t!
select sts + 12341032082045.303030 into :a from t!
select sts - 12341032082045.303030 into :a from t!
select sts - timestamp ('19581014232015000000') INTO :a, :b FROM t!
select timestamp ('19581014232015000000') - sts INTO :a, :b FROM t!
select st - time ('232015') INTO :a, :b FROM t!
select time ('232015') - st INTO :a, :b FROM t!
update t set sd = '19940531'!
select sd + 31 day   into :a from t!
select sd +  1 month into :a from t!
update t set sts = '19940531153059000000'!
select sts + 31 day   into :a from t!
select sts +  1 month into :a from t!
drop table t !
commit release !
