title: How to process 0000-00-00 date in jdbc MySQL query
body: <p>I'm getting this exception:</p>
  
  <pre><code>java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date
  </code></pre>
  
  <p>Originating from this code:</p>
  
  <pre><code>Date internalDate = rs.getDate(idx++);
  </code></pre>
  
  <p>Where <code>rs</code> is a <code>ResultSet</code>.</p>
  
  <p>So this is fine to me - I know there are zero'ed dates in the database and I need to be able to read these and convert them into an appropriate (probably null) data in my downstream data structures.  The problem is I don't know how to retrieve it and get a "soft" error.  I thought about wrapping this line in a try/catch for SQLException but understand this will break validity of the ResultSet.</p>
  
  <p>Is it possible to read this value in another way without throwing a SQLException?</p>