title: Teradata character to date conversion
body: <p>I have a string associated with date in ‘Teradata’ tables</p>
  
  <pre><code>Var1=09OCT2017-EMRT
  </code></pre>
  
  <p>I need to extract the date from the above string in ‘mm/dd/yyyy’ format</p>
  
  <p>I tried the following</p>
  
  <pre><code> Cast(cast(substr(var1,1,9) as char(20)) as date format    ‘mm/dd/yyyy’) as date
  </code></pre>
  
  <p>I am getting error as ‘invalid date supplied for var1’</p>
  
  <p>I would appreciate your help</p>