title: Calculating age in Delphi
body: <pre><code>iAge := 2013 - StrToInt(sJ) ;
  if iAge&lt; 18
  then
  begin
  bDatum := False ;
  ShowMessage('You must be older than 18!') ;
  Exit ;
  end; //IF
  </code></pre>
  
  <p>If you use this it will just take the current year and the year the user typed in and test if he is 18 or not, I'm looking for a way to to calculate the age of the user using the month and day as well but it was to no avail, so I was hoping to get some help from Stackoverflow.</p>
  
  <p>Help will be much appreciated!</p>