title: Oracle query to calculate current age
body: <p>I want to calculate current age of person from DOB(date of birth) field in Oracle table.</p>
  
  <p>Data type of DOB field is varchar and the is date stored in format 'DD-MON-YY'.</p>
  
  <p>when I calculate current age of a person from date like <code>10-JAN-49</code> the query will return age in negative. Also, I observed that if date has year 13 to 49 it gives negative result.</p>
  
  <p>Examples</p>
  
  <pre><code>22-NOV-83 -valid result
  09-FEB-58 --valid result
  05-JUN-49 - Invalid result like -36
  </code></pre>
  
  <p>Query Executed for reference</p>
  
  <pre><code>select round(MONTHS_BETWEEN(sysdate,to_date(dob,'DD-MON-RR'))/12)||' Yrs' 
  from birth
  </code></pre>
  
  <p>Any help is appreciated!</p>