Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Date range using dual table

652398Dec 5 2012 — edited Dec 6 2012
I 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 3 2013
Added on Dec 5 2012
13 comments
2,174 views