title: How to deal with a date stored as a string in an int field in Teradata?
body: <p>I've got a table in Teradata that stores a date in an 8 character INT field in the following form "YYYYMMDD", so for today it would store "20180308". If I try to CAST it as a date like this:</p>
  
  <p><code>CAST(date_field AS DATE FORMAT 'YYYY-MM-DD')</code></p>
  
  <p>It transforms the date to some future date in the year 3450 or something.</p>
  
  <p>I think it's an error that this data isn't either stored as a date object. Is there anyway to overcome this glitch? I don't have access to change this unfortunately.</p>
  
  <p>Thanks</p>