title: sql query to get last 6 months of data
body: <p>I am trying to get the data for the last 6 months.</p>
  
  <p>This is what I have used:</p>
  
  <pre><code>WHERE d_date &gt; DATEADD(m, -6, current_timestamp)
  </code></pre>
  
  <p>and I am getting this error.</p>
  
  <pre><code>ERROR: CLI prepare error: SQL0206N  "M" is not valid in the context where it is used
  </code></pre>
  
  <p>also tried</p>
  
  <pre><code>WHERE d_date &gt; current date -180 
  </code></pre>
  
  <p>and got this error:</p>
  
  <pre><code>ERROR: CLI prepare error: SQL0171N  The data type, length or value of the argument for the parameter in 
     position "2" of routine "-" is incorrect. Parameter name: "".  SQLSTATE=42815
  </code></pre>
  
  <p>Please advice.</p>