Skip to content
Advertisement

Subtracting Dates ORA 01722

I am attempting to subtract two dates and get a integer value in return. I have seem to hit a roadblock since one of the two dates is null which subsequently returns an error. Is there any workaround to this, I covet to get the aging_date instead if the review_date is null.

Advertisement

Answer

You must convert the varchar2 column in DATE column.

Subtracting DATE and VARCHAR2 leads to an ORA-01722: invalid number

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement