title: Passing date value from apex in plsql procedure
body: <p>I have a problem in Apex with the date format. In my database a date is formatted as '29-05-1994' (DD-MM-YYYY), the same format is being displayed at my apex-page, however not in my session-state (DD-MON-YY). With a procedure I try to calculate someone's age. The result is -79.61. That's not correct, it has something to do with the format. When I change my format to DD-MON-YYYY in the procedure I will get: 2000 something. Still not correct. Does anyone know how to solve this format-problem?</p>
  
  <p>Here is part of my procedure:</p>
  
  <pre><code>&gt; v_datum date := to_date(V('P7_GEBOORTEDATUM'), 'DD-MON-YY');
  &gt; v_leeftijd number(10,2);
  &gt; 
  &gt; -- check my age (in years) 
  &gt; v_leeftijd := (sysdate - v_datum)/365;
  </code></pre>