mysql sql时间戳格式化语句


FROM_UNIXTIME(c.lastUpdateTime/1000,'%Y-%c-%d %h:%i:%s' ) as updatetime;

 

 

 

select c.roleid, r.username, r.rolename, c.chargeId, c.productId, c.price, c.stone, c.status, FROM_UNIXTIME(c.lastUpdateTime/1000,'%Y-%c-%d %h:%i:%s' ) as updatetime  from charge c, role r where c.roleid=r.id and c.status=2 order by c.lastUpdateTime asc;

 

 

 

 

select c.roleid, r.username, r.rolename, c.chargeId, c.productId, c.price, c.stone, c.status, FROM_UNIXTIME(c.lastUpdateTime/1000,'%Y-%c-%d %h:%i:%s' ) as updatetime, c.lastUpdateTime  from charge c, role r where c.roleid=r.id and c.status=2 and c.lastUpdateTime>=1561648730946  order by c.lastUpdateTime asc;

 

 

 

 

MariaDB [codex_game]> select c.roleid, r.username, r.rolename, c.chargeId, c.productId, c.price, c.stone, c.status, FROM_UNIXTIME(c.lastUpdateTime/1000,'%Y-%c-%d %h:%i:%s' ) as updatetime, c.lastUpdateTime  from charge c, role r where c.roleid=r.id and c.status=2 and c.lastUpdateTime>=1561648730946  order by c.lastUpdateTime asc;


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM