title: H2 Database : Cannot parse "DATE" constant "31-JAN-20" while inserting a new record
body: <p>Consider the following DDL I am using to create an H2 database table  in one of my JUnit test cases :</p>
  
  <pre><code>CREATE TABLE "CONFIG_INFO" 
     (    "ID" VARCHAR2(12 BYTE), 
          "RUN_DATE" DATE, 
     );
  </code></pre>
  
  <p>The class that I am writing a unit test for tries to insert a record in this table. I can see that the following query is executed for inserting a record :</p>
  
  <pre><code>insert into CONFIG_INFO(ID,RUN_DATE) values (?,?) 
  </code></pre>
  
  <p>However, the insertion fails with the following exception :</p>
  
  <pre><code>org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into CONFIG_INFO(ID,RUN_DATE) values (?,?)]; Cannot parse "DATE" constant "31-Jan-20"; 
  </code></pre>
  
  <p>I looked around and found that this issue usually occurs when you have a time component as part of the date; however, debugged the code and I can see that the Java code is passing "31-Jan-20" with no time stamp component as can also be seen from the error message above.</p>
  
  <p><strong>How can I resolve this error?</strong></p>