title: SQL query for SQLite / java.text.ParseException: Unparseable date
body: <p>I compiled this, but this code occurs java.sql.SQLException and java.text.ParseException at resultSet.getDate() method.</p>
  
  <pre><code>import java.sql.Connection;
  import java.sql.Date;
  import java.sql.DriverManager;
  import java.sql.ResultSet;
  import java.sql.SQLException;
  import java.sql.Statement;
  
  class Main {
      public static void main(String[] args) throws SQLException {
          try {
              Class.forName("org.sqlite.JDBC");
  
              Connection connection = DriverManager.getConnection
              ("jdbc:sqlite:C:/sqlite-tools/test.db");
  
              Statement statement = connection.createStatement();
  
              String sql = "CREATE TABLE t1 (" +
                           "no INTEGER PRIMARY KEY, " +
                           "date DATE, " +
                           "content TEXT)";
              statement.executeUpdate(sql);
  
              sql = "INSERT INTO t1 (date, content)" +
                    "VALUES(DATETIME('NOW', 'LOCALTIME'), 'test');";
              statement.executeUpdate(sql);
  
              ResultSet resultSet = statement.executeQuery("SELECT * FROM t1;");
              while(resultSet.next()) {
                  // here occurs exception ↓ :(
                  Date date = resultSet.getDate("date");
                  // here occurs exception ↑ :(
                  String text = resultSet.getString("content");
  
                  System.out.println(date + " " + text);
              }
  
              statement.close();
              connection.close();
          } catch(ClassNotFoundException e) {
              e.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p>exception explaination is this.</p>
  
  <pre><code>Exception in thread "main" java.sql.SQLException: Error parsing time stamp
  at org.sqlite.jdbc3.JDBC3ResultSet.getDate(JDBC3ResultSet.java:327)
  at org.sqlite.jdbc3.JDBC3ResultSet.getDate(JDBC3ResultSet.java:346)
  at com.planb.main.Main.main(Main.java:35)
  Caused by: java.text.ParseException: Unparseable date: "2016-12-20 17:08:07" does not match (\p{Nd}++)\Q-\E(\p{Nd}++)\Q-\E(\p{Nd}++)\Q \E(\p{Nd}++)\Q:\E(\p{Nd}++)\Q:\E(\p{Nd}++)\Q.\E(\p{Nd}++)
  at org.sqlite.date.FastDateParser.parse(FastDateParser.java:299)
  at org.sqlite.date.FastDateFormat.parse(FastDateFormat.java:490)
  at org.sqlite.jdbc3.JDBC3ResultSet.getDate(JDBC3ResultSet.java:324)
  ... 2 more
  </code></pre>
  
  <p>I can't find any solutions for two hours. Help me please. :(</p>