title: Query on Date only with Spring Boot Data JPA / Java 8 Instant?
body: <p>I have a Spring boot 1.4.x application that uses the starter jpa in combination with H2/Postgresql. I have an entity that stores a date as an Instant (with Instant.now(), based on <a href="https://stackoverflow.com/questions/32437550/java-8-whats-the-difference-between-instant-and-localdatetime">Java 8: What&#39;s the difference between Instant and LocalDateTime?</a> answer), and the associated table stores this field as a timestamp.</p>
  
  <p>For the storing to work I had to setup a converter that converts Instant's to sql.Timestamps &amp; vice versa, which seems to work (Timestamp.from(instant) and timestamp.toInstant())</p>
  
  <p>My question is if there is a straightforward way to query by Date only using this instant using JPA repository, eg.</p>
  
  <p><code>List&lt;Orders&gt; findBySaleTime(.... day)</code></p>
  
  <p>Or am I forced to find a way to convert the day to two instants &amp; do an in between query?</p>