Issue
I need to retrieve distinct LocalDate from LocalDateTime in database. I can use Spring data JPA or SQL native query.
Solution
I think you can do something like this :
@Query(value="select * from posts where published_at Between ?1 And ?2", nativeQuery = true)
Page<Posts> findAllPostsByPublishedDate(LocalDate dateFrom, LocalDate dateTo, Pageable pageable);
Answered By - Janil101
Answer Checked By - Clifford M. (JavaFixing Volunteer)