I am trying to subtract a Day from a date.
In the line below I am added a month to the current data in column Transaction_Date, then I want to subtract a Day from column Transaction_Date. Then subtract the two Dates.
ADD_MONTHS(INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE, 1)-(INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE -1)-1 AS TRANSACTION_DATE
When I try INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE -1 it returns a number (the Day) not a Date. I have tried using To_DATE and TO_CHAR, same result. Column Transaction_Date has a datatype of DATE.
How do I make INV.MTL_MATERIAL_TRANSACTIONS.TRANSACTION_DATE -1 return a Date?