Posted: Thu Oct 16, 2003 4:39 am Post subject: Subtracting Timestamps
Novice
Joined: 23 Sep 2003 Posts: 14
I am trying to get the interval in days between two timestamps. I have included my code below. I am getting an error requesting an interval qualifier. I am sure it is my syntax.... any help would be appreciated.
IF ("InputBody"."TSYS_CRDRIN_LICI"[T]."DateLastCardRequest") <> '0000000' THEN
SET SCRATCHTIME = SUBSTRING("InputBody"."TSYS_CRDRIN_LICI"."TimeLastCardRequest" FROM 1 FOR 2) || ':'
|| SUBSTRING("InputBody"."TSYS_CRDRIN_LICI"."TimeLastCardRequest" FROM 3 FOR 2)|| ':'
|| '01';
SET INDATE = (CONVERTDATE("InputBody"."TSYS_CRDRIN_LICI"[T]."DateLastCardRequest") || ' ' || SCRATCHTIME);
SET TIMEDIFF = CAST((SCRATCHDATE - INDATE) AS INTERVAL DAY);
END IF;
SET T = T + 1;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum