📜  jpa 选择日期格式 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:54.927000             🧑  作者: Mango

代码示例1
//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> findRegisteredCustomersHistory(@Param("startDate") Date startDate, @Param("endDate") Date endDate);