title: Why is this SQLite query not letting me cast the integer and subtract?
body: <p>I have multiple columns in Azure Machine Learning that each have an hour, year, day, minute, etc for a date. I need to convert this hour from UTC to EDT, and then make it a date string such as</p>
  
  <blockquote>
    <p>YYYY/MM/DD HH:SS</p>
  </blockquote>
  
  <p>This way, I can do an inner join. I've tried using CAST, CONVERT, and other SQLite functions, but none of these combos work. Here is where I am now: </p>
  
  <pre><code>select *
  CAST([Col11] as int) -4 as EDTHour
  
  ([Col8] || '/' || [Col9] || '/' || [Col10] || ' ' || EDTHour|| ':' || [Col12]) as WeatherTime from t1
  
  select 'Time Stamp' as secondTableTime from t2
  
  SELECT *
  FROM t1
  INNER JOIN t2
  ON t1.WeatherTime=t2.secondTableTime
  </code></pre>
  
  <p>However, It never lets me cast the varchar column Col11 to a integer or decimal. What am I missing? </p>