Home » SQL & PL/SQL » SQL & PL/SQL » Number of Months between two different Years (Oracle 9i)
Number of Months between two different Years [message #340466] Wed, 13 August 2008 00:54 Go to next message
cvs_1984
Messages: 136
Registered: August 2007
Location: Punjab, INDIA
Senior Member

I need to find the number of months for the employee service detail.
How to find it. Please reply me.
Re: Number of Months between two different Years [message #340467 is a reply to message #340466] Wed, 13 August 2008 01:00 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Did you try Googling for your topic title, with Oracle added to it?
Not to be rude, but Google really does solve a lot of Oracle-related questions.

[Updated on: Wed, 13 August 2008 01:01]

Report message to a moderator

Re: Number of Months between two different Years [message #340470 is a reply to message #340467] Wed, 13 August 2008 01:10 Go to previous messageGo to next message
cvs_1984
Messages: 136
Registered: August 2007
Location: Punjab, INDIA
Senior Member

thank you
Re: Number of Months between two different Years [message #340663 is a reply to message #340466] Wed, 13 August 2008 13:37 Go to previous messageGo to next message
Bill B
Messages: 1484
Registered: December 2004
Senior Member
Check out the months_between function for oracle.
Re: Number of Months between two different Years [message #340700 is a reply to message #340466] Wed, 13 August 2008 18:56 Go to previous messageGo to next message
krishnareddy.ponugeti
Messages: 3
Registered: August 2008
Location: visakapatanam
Junior Member
select to-char(months_between(sysdate,hiredate))from dual
i think it is helpful to u
Re: Number of Months between two different Years [message #340701 is a reply to message #340466] Wed, 13 August 2008 19:00 Go to previous message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
krishnareddy.ponugeti,

http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above

>select to-char(months_between(sysdate,hiredate))from dual
Beside being invalid SQL, in my opinion it is also incomplete.
Previous Topic: Comparing date and string with SQL where clause
Next Topic: Using Bind Variable in IN Clause
Goto Forum:
  


Current Time: Sat Dec 10 05:24:48 CST 2016

Total time taken to generate the page: 0.07493 seconds