title: Set date/time value in H2 with PreparedStatement
body: <p>I cannot figure out what the problem is. Nothing done here different from any other database, but while trying to use H2 (v1.3.176) is simply no luck. The table is:</p>
  
  <pre><code>CREATE TABLE AccessesByMinute (
    Count INT NOT NULL,
    UrlID BIGINT NOT NULL,
    ServerID BIGINT NOT NULL,
    RemoteIP VARCHAR(50) NOT NULL,
    Longitude FLOAT,
    Latitude FLOAT,
    Moment DATETIME,
    UserID DATETIME
  );
  </code></pre>
  
  <p>The code is:</p>
  
  <pre><code>...
  Date timestamp = Utils.getNearest(Calendar.MINUTE, access.getTimestamp());
  ...
  Calendar cal = Calendar.getInstance();
  cal.setTimeInMillis(time);
  cal.set(Calendar.MILLISECOND, 0);
  cal.set(Calendar.SECOND, 0);
  ....
  
       try (PreparedStatement ps = con.prepareStatement("INSERT INTO AccessesByMinute (Moment, UserID, UrlID, ServerID, RemoteIP, Longitude, Latitude, Count) VALUES (?, ?, ?, ?, ?, ?, ?, 1)");
        {
          ps.setTimestamp(1, new Timestamp(timestamp.getTime()));
          ps.setLong(2, userId);
          ps.setLong(3, urlId);
          ps.setLong(4, serverId);
          ps.setString(5, access.getRemoteIp());
          ps.setFloat(6, (loc == null ? 0 : loc.longitude));
          ps.setFloat(7, (loc == null ? 0 : loc.latitude));
          ps.executeUpdate();  
        }
  </code></pre>
  
  <p>And keep getting the error:</p>
  
  <blockquote>
    <p>org.h2.jdbc.JdbcSQLException: Cannot parse "TIMESTAMP" constant "1";
    SQL statement:</p>
  </blockquote>
  
  <p>timestamp.getTime() returns a long which is argument of java.sql.Timestamp
  What am I not seeing?</p>