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