Re: PL/SQL code for calculating time between two dates?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 4 Jun 2003 06:41:22 -0700
Message-ID: <2687bb95.0306040541.b88d857_at_posting.google.com>


"Dražen Klisurić" <drazen.klisuric_at_sb.tel.hr> wrote in message news:<bbkevv$5e4l$1_at_as201.hinet.hr>...
> Is ther any function to calculate number of days, monts and years between
> two dates in PL/SQL.
> Thanks.

The Oracle SQL date functions described in the SQL Manual chapter on single row functions are also available in pl/sql. See months_between, add_months, last_day, plus you can use standard date math where you can subtracts dates from each other to get a result in days: days_between := newer_date - older_date;

HTH -- Mark D Powell -- Received on Wed Jun 04 2003 - 15:41:22 CEST

Original text of this message