DBMNG数据库管理与应用

抓住自己最有兴趣的东西,由浅入深,循序渐进地学……
当前位置:首页 > SQLite > 应用案例

sqlite时间戳转时间语句

下面是具体的实现代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
sqlite>SELECTdatetime(1377168853,'unixepoch','localtime');
 
+------------------------------------------------+
| datetime(1377168853,'unixepoch','localtime') |
+------------------------------------------------+
| 2013-08-22 18:54:13              |
+------------------------------------------------+
1 rowinset
 
sqlite>SELECTstrftime('%s','now');
+----------------------+
| strftime('%s','now') |
+----------------------+
| 1380728519      |
+----------------------+
1 rowinset
 
sqlite>SELECTdatetime('now');
+---------------------+
| datetime('now')   |
+---------------------+
| 2013-10-02 15:40:44 |
+---------------------+
1 rowinset
本站文章内容,部分来自于互联网,若侵犯了您的权益,请致邮件chuanghui423#sohu.com(请将#换为@)联系,我们会尽快核实后删除。
Copyright © 2006-2023 DBMNG.COM All Rights Reserved. Powered by DEVSOARTECH            豫ICP备11002312号-2

豫公网安备 41010502002439号