select date('now') --2020-05-28当前时间:
select time('now') --04:03:22当前时间-北京时间:
select datetime('now', 'localtime') --2020-05-28 12:03:226年以后:
select date('now', '+6 years') --2026-05-286月以后:
select date('now', '+6 months') --2020-11-286天以后:
select date('now', '+6 days') --2020-06-03当年1月1日:
select date('now', 'start of year') --2020-01-01当年5月1日:
select date('now', 'start of year', '+4 months') --2020-05-01当月的第一天:
select date('now', 'start of month') --2020-05-01当月最后一天:
select date('now', 'start of month', '+1 months', '-1 days') --2020-05-31参考资料
[1].SQLite 日期 & 时间:https://www.runoob.com/sqlite/sqlite-date-time.html
评论(0)
暂无评论。