zoukankan      html  css  js  c++  java
  • date_and_time

    [dba@localhost:mysql.sock] [app01]> select localtime(),localtimestamp(),now(),sysdate(),current_timestamp(),current_date(),curdate(),current_time(),curtime(),unix_timestamp(),utc_timestamp(),utc_date(),utc_time();
    +---------------------+---------------------+---------------------+---------------------+---------------------+----------------+------------+----------------+-----------+------------------+---------------------+------------+------------+
    | localtime()         | localtimestamp()    | now()               | sysdate()           | current_timestamp() | current_date() | curdate()  | current_time() | curtime() | unix_timestamp() | utc_timestamp()     | utc_date() | utc_time() |
    +---------------------+---------------------+---------------------+---------------------+---------------------+----------------+------------+----------------+-----------+------------------+---------------------+------------+------------+
    | 2020-09-16 19:35:18 | 2020-09-16 19:35:18 | 2020-09-16 19:35:18 | 2020-09-16 19:35:18 | 2020-09-16 19:35:18 | 2020-09-16     | 2020-09-16 | 19:35:18       | 19:35:18  |       1600256118 | 2020-09-16 11:35:18 | 2020-09-16 | 11:35:18   |
    +---------------------+---------------------+---------------------+---------------------+---------------------+----------------+------------+----------------+-----------+------------------+---------------------+------------+------------+
    1 row in set (0.00 sec)
    
    [dba@localhost:mysql.sock] [app01]> select localtime(),localtimestamp(),now(),sysdate(),current_timestamp(),current_date(),curdate(),current_time(),curtime(),unix_timestamp(),utc_timestamp(),utc_date(),utc_time()G
    *************************** 1. row ***************************
            localtime(): 2020-09-16 19:35:20
       localtimestamp(): 2020-09-16 19:35:20
                  now(): 2020-09-16 19:35:20
              sysdate(): 2020-09-16 19:35:20
    current_timestamp(): 2020-09-16 19:35:20
         current_date(): 2020-09-16
              curdate(): 2020-09-16
         current_time(): 19:35:20
              curtime(): 19:35:20
       unix_timestamp(): 1600256120
        utc_timestamp(): 2020-09-16 11:35:20
             utc_date(): 2020-09-16
             utc_time(): 11:35:20
    1 row in set (0.00 sec)
  • 相关阅读:
    Centos7 一键脚本离线安装 Docker-18.03.1-ce
    RedHat 6.8 离线安装Docker (rpm包安装)
    extends和implements区别
    chrome浏览器 同站(SameSite)策略 导致 iframe 内嵌页面cookie无法写入
    快速删除node_modules文件夹:rimraf
    Antd中InputNumber组件数字限制小数位数
    慧聪网如何注册
    2020年9月至10月 Splashtop 新功能
    远程桌面软件的5个首要功能
    Splashtop和 TiFlux 宣布建立合作伙伴关系
  • 原文地址:https://www.cnblogs.com/zhouwanchun/p/13680799.html