Re: DATE column difference in minutes.

From: <>
Date: 1997/05/23
Message-ID: <>#1/1

On Thu, 22 May 1997 14:36:28 -0700, Guna Govind <> wrote:

> I'm using Oracle7.3 on Solaris 2.5.1.
>I need to calculate the time difference in minutes from 2 character
>strings (basically the timestamp is stored in a 'C' program
>as a charcter string). I tried to convert the character string
>to "date" format using "to_date", and subtracted them. But it always
>subtracts the date portion of the timestamp, but not the time.That is,
>if I subtract two different times on the same date, I always
>get '0'.

I tried this in SQLPlus and it works fine. See the following code:

  1 select
  2 to_date('12-JAN-97 15:32', 'DD-MON-YY HH24:MI') -   3 to_date('12-JAN-97 13:44', 'DD-MON-YY HH24:MI') "Diff"   4* from dual
SQL> /         Diff


How about posting the code that's not working for you.

R M Sampson Received on Fri May 23 1997 - 00:00:00 CEST

Original text of this message