The result of subtracting one timestamp (TS2) from another (TS1) is a timestamp duration that specifies the number of years, months, days, hours, minutes, seconds, and microseconds between the two timestamps.
If %MICSEC(TS2) <= %MICSEC(TS1) ;
then %MICSEC(RESULT) = %MICSEC(TS1) - ;
%MICSEC(TS2).
If %MICSEC(TS2) > %MICSEC(TS1) ;
then %MICSEC(RESULT) = 1000000 + ;
%MICSEC(TS1) - %MICSEC(TS2) ;
and %SECOND(TS2) is incremented by 1.
If %HOUR(TS2) <= %HOUR(TS1) ;
then %HOUR(RESULT) = %HOUR(TS1) - %HOUR(TS2).
If %HOUR(TS2) > %HOUR(TS1) ;
then %HOUR(RESULT) = 24 + %HOUR(TS1) - %HOUR(TS2) ;
and %DAY(TS2) is incremented by 1.
The date part of the timestamp is subtracted as specified in the rules for subtracting dates.