Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: days old sql query

Re: days old sql query

From: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Sun, 24 Apr 2005 09:46:04 -0700
Message-ID: <mcKdnRSg8oO9UPbfRVn-pA@comcast.com>

"David Arden Stevensonn" <dfgkkdfjgddfgd_at_gmail.com> wrote in message news:VIPae.11220$n93.1616_at_twister.nyc.rr.com...
>
>
> One of the columns in my table holds the SYSDATE of when a record was
> inserted. How can I get the age in days (since it was inserted) using a
sql
> query? Just want an integer of the num of days.
>
> Thanks in advance.
>
>

select trunc(sysdate-the_column_you mention) days_old from yourtable; Jim Received on Sun Apr 24 2005 - 11:46:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US