sqlite時間戳記轉時間語句(時間轉時間戳記)

來源:互聯網
上載者:User

下面是具體的實現代碼:

sqlite> SELECT datetime(1377168853, 'unixepoch', 'localtime');+------------------------------------------------+| datetime(1377168853, 'unixepoch', 'localtime') |+------------------------------------------------+| 2013-08-22 18:54:13              |+------------------------------------------------+1 row in setsqlite> SELECT strftime('%s','now');+----------------------+| strftime('%s','now') |+----------------------+| 1380728519      |+----------------------+1 row in setsqlite> SELECT datetime('now');+---------------------+| datetime('now')   |+---------------------+| 2013-10-02 15:40:44 |+---------------------+1 row in set

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.