@Query("select a.id,a.title,a.author,a.pulblicTime from Articles a")
Page<Articles> getAriticleList(Pageable pageable);
我尝试用
convert(char(20),a.pulblicTime,109)
或者
data_format(a.pulblicTime,"%Y-%M")
输出到前端还是长串的数字啊。
到底该怎么处理才是正常的字符串时间呢??
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
select from_unixtime(int_time_stamp, '%y-%m-%d') from test;干嘛要用sql做,在entity中时间的get方法里处理不就好了