title: PostgreSQL Timestampz BIRT Params
body: <p>I am having an issue with adding a timestamp with timezone, aka timestampz, as a parameter in BIRT for querying postgreSQL. </p>
  
  <p>With no param in BIRT the following works fine:</p>
  
  <pre><code>WHERE start_date = '2016-02-02 03:26:30.000Z'
  </code></pre>
  
  <p>Now with a param in BIRT, I can't get any combination of a DateTime to work:</p>
  
  <pre><code>WHERE start_date = ?
  </code></pre>
  
  <p>Next I make the param which fails as DateTime data type and as string data type:</p>
  
  <p><a href="https://i.stack.imgur.com/pWIHW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pWIHW.png" alt="enter image description here"></a></p>
  
  <p>In the param editor, I've also tried the following in default value expression:</p>
  
  <pre><code>BirtDateTime.now()
  </code></pre>
  
  <p>and</p>
  
  <pre><code>new Date().toISOString().replace("T"," ")
  </code></pre>
  
  <p>I always get an error saying:</p>
  
  <pre><code>ERROR: operator does not exist: timestamp with time zone = character varying
  Hint: No operator matches the given name and argument type(s). 
  You might need to add explicit type casts.
  </code></pre>
  
  <p>I even tried casting like so:</p>
  
  <pre><code>WHERE start_date = ?::timestampz
  </code></pre>
  
  <p>BIRT just tells me the syntax is not supported, which means it is just not supported on a parameter. </p>
  
  <p>On another note, how can you debug BIRT queries? I would like to see what the startDate param is right before it is added to the query.</p>
  
  <p>In the mean time I'm going to have to take the "hacky" route. :(</p>
  
  <pre><code>WHERE extract(year from start_date) = ?
  AND extract(month from start_date) = ?
  AND extract(day from start_date) = ? 
  </code></pre>
  
  <p>----- <strong>EDIT</strong> -----
  Dang! 8 months later and no response. Still haven't figured this out. Just been using the hacky route till this day. I guess just not enough people use BIRT and Postgres :(</p>