Hi Everyone,
I am trying to add days to my date in an update statement. I have an interactive grid. When a line is updated and set to completed, it records the completed date, then adds 365 days to that date for the expiry date like below.
BEGIN
case :APEX$ROW_STATUS
when 'U' then
UPDATE TABLE1 SET
COMP_DATE = :COMP_DATE,
EXP_DATE = :COMP_DATE + 365
--EXP_DATE = SYSDATE + 365 ***THIS WORKS***
WHERE ROWID = :ROWID;
end case;
END;
When trying to add days to :COMP_DATE, I'm getting a “ORA-00932: inconsistent datatypes: expected DATE got NUMBER” error. SYSDATE + 365 works perfectly fine though.
Is there a special way to add days to a date value in an interactive grid? I have also tried declaring a variable, adding days to that date variable, then setting EXP_DATE = ExpDate, but had the same issue.