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: oracle dates calculations

Re: oracle dates calculations

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Fri, 27 Jun 2003 20:09:26 +0100
Message-ID: <of5pfvs0pdpp0ta8nkb78oj8lt1hk68g9f@4ax.com>


On 27 Jun 2003 07:29:19 -0700, jwagans_at_yahoo.com (jim agans) wrote:

>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?

SELECT extract(year from

               (sysdate - TO_DATE('01011970', 'MMDDYYYY')) year to month)
       AS age

FROM dual
--
Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Received on Fri Jun 27 2003 - 14:09:26 CDT

Original text of this message

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