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

Home -> Community -> Usenet -> c.d.o.server -> Re: Date function question

Re: Date function question

From: Abey Joseph <abeyj_at_netzero.net>
Date: 2000/03/03
Message-ID: <89ou11$iot$1@nntp3.atl.mindspring.net>#1/1

This statement would give me an age that will be incorrect if the date and month for DOB is > sysdate!

<yong321_at_yahoo.com> wrote in message news:89os9l$nuj$1_at_nnrp1.deja.com...
> select to_char(sysdate,'yyyy')-to_char(dob,'yyyy') age
> from emp;
>
> Yong Huang
>
> (yong321_at_yahoo.com)
> (http://www.stormloader.com/yonghuang/)
>
>
> In article <89op0a$k27$1_at_nntp3.atl.mindspring.net>,
> "Abey Joseph" <abeyj_at_netzero.net> wrote:
> > I am writing a report that shows a bunch of customer data. I need to
> > extract the exact age of the customer. I am not sure if there is an
 Oracle
> > function that will give me the exact age. I subtracted the
 date_of_birth
> > from the sysdate and I get the number of days in between. How can I
 then
> > translate that to years and months? I can divide the days by 365, but
 the
> > margin of error gets bigger, the older the customer is. Any help is
> > appreciated.
> >
> > Abey Joseph
> > abeyj_at_netzero.net
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Fri Mar 03 2000 - 00:00:00 CST

Original text of this message

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