Re: How many months are in a range of dates?

From: Marc de Brouwer <mbrouwer_at_nl.oracle.com>
Date: 1995/07/25
Message-ID: <3v3rc1$6t1_at_nlsu110.nl.oracle.com>#1/1


Claudio Longo (Claudio_at_bnr.ca) wrote:
: Using a column (hire_date) and sysdate, how can I select the
: number of months a person has worked.

R
Claudio,

this is relatively straightforward: there exists a SQL function called months_between which determines the number of months between two dates, e.g. "select months_between(a.hire_date,sysdate) from my_table a" Hope this is what you are looking for.

Marc.

  • These are my own opinions, not Oracle's
Received on Tue Jul 25 1995 - 00:00:00 CEST

Original text of this message