title: Convert from date to epoch-Oracle
body: <p>I need to convert a date from a TextBox from date to epoch time so that I can insert it into Oracle DB.</p>
  
  <p>I managed to convert from epoch to date as below, but couldn't find a way to convert it the other way.</p>
  
  <pre><code>SelectCommand="SELECT ID,
              COMPANY,
              FIRST_NAME,
              LAST_NAME,
              ID_NUMBER,
              (SELECT TO_CHAR(TO_DATE('01-JAN-1970','DD/MM/YYYY')
              +(TRAINING_DATE/60/60/24), 'MM/DD/YYYY') FROM dual) AS TRAINING_DATE,
              (SELECT TO_CHAR(TO_DATE('01-JAN-1970','DD/MM/YYYY')
              +(TRAINING_VALABILITY/60/60/24),'MM/DD/YYYY') FROM dual) AS TRAINING_VALABILITY
      FROM CONTRACTORS
      ORDER BY COMPANY"
  </code></pre>