Date range using dual table
652398Dec 5 2012 — edited Dec 6 2012I want to get the range of two date(two variables: e_date and s_date) in a proc code. Or I want to ensure the date range must be less than 180 days.
I used: "SELECT to_date(:e_date1, 'DDMONYY') - to_date(:s_date1, 'DDMONYY') INTO :count FROM DUAL;" and "if (count <= 180)" in a proc code.
I don't know whether there is some risks in that? Thanks.