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!

Exact Month & Days between 2 dates

652211Mar 4 2010 — edited Mar 4 2010
hello Seniors,

i am using Oracle Database 10g Release 10.2.0.1. with Form 6i

i want to find difference between SYSDATE and the user entered date field in the format example;
select months_between(sysdate,to_date('15012010','ddmmyyyy')) ddiff from dual;

     DDIFF
----------
1.66275911

but i want the query to separate "mmnth" and "ddays" into numeric columns and display like this ;

mmnth   ddays
   1       17
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 1 2010
Added on Mar 4 2010
9 comments
4,392 views