Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

jpa select date format

//Spring Boot Repository
@Query(value = "SELECT count(ac) as count, function('date_format', max(ac.subscriptionStartDate), '%Y, %m, %d') as date FROM MyTable ac " +
        "WHERE ac.subscriptionStartDate BETWEEN :startDate AND :endDate GROUP BY function('date_format', ac.subscriptionStartDate, '%Y, %m, %d')")
public List<Map<String,Object>> findRegisteredCustomersHistory(@Param("startDate") Date startDate, @Param("endDate") Date endDate);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jpa #select #date #format
ADD COMMENT
Topic
Name
4+6 =