| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: oracle dates calculations
"Jim Kennedy" <kennedy-downwithspammersfamily_at_attbi.com> wrote in message
news:zAYKa.33045$Ab2.58464_at_sccrnsc01...
> 1. dates are not strings. dates are displayed and that is what you are
> seeing. Subtract the date of birth and today (sysdate) and if the
> difference is >= 18 * 365 then the individual is 18.
> Jim
> "jim agans" <jwagans_at_yahoo.com> wrote in message
> news:82659da6.0306270629.68eee0cd_at_posting.google.com...
> > I have a date of birth.....'MMDDYYYY' What I need to do is find out if
> > the individual is 18 years old on this date.
> > How can I do it ...any help someone?
> >
> > thanks
> > jim
>
>
Jim(s)
There will be inaccuracies due to leap years with 18*365.
I would try something based on
add_months(sysdate, -12*18).
You could still have problems with leap years though.
HTH eric Received on Fri Jun 27 2003 - 10:34:32 CDT
![]() |
![]() |