Skip to Main Content

Oracle Database Discussions

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!

Extracting month from date

389987Jul 2 2003 — edited Jul 3 2003
hi,

I have a query in Informix which get the month part of a date. Please help me in converting the same to oracle.

Informix query
select month(col1 - today) from tab1;

col1 is a date field, today will yield the current date and month function will get the month of the date.
In oracle, when we subtract two dates we will get a number value, how to convert that back to date and extract the month part.
Help me?????
Regards,
Gopu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 31 2003
Added on Jul 2 2003
2 comments
398 views