首页 > 数据库 > SQLite > 正文

sqlite时间戳转时间语句(时间转时间戳)

2020-01-31 15:12:04
字体:
来源:转载
供稿:网友

下面是具体的实现代码:

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
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表