zoukankan      html  css  js  c++  java
  • 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;

  • 相关阅读:
    day22-20180522笔记
    day20-20180517笔记
    day19-20180515笔记
    day18-20180513笔记
    day17-20180510笔记
    day16-20180508笔记
    Python之初识面向对象
    Python之常用模块(2)
    Python之常用模块(1)
    Python之模块与包(下)
  • 原文地址:https://www.cnblogs.com/xingchong/p/11128971.html
Copyright © 2011-2022 走看看