从 SQLite 中的 DATETIME 获取月份 [英] Get month from DATETIME in sqlite
本文介绍了从 SQLite 中的 DATETIME 获取月份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图从 SQLite 的 DATETIME
字段中提取月份.month(dateField)
不如 strftime('%m', dateStart)
.
I am trying to get extract the month from a DATETIME
field in SQLite. month(dateField)
does not work as well as strftime('%m', dateStart)
.
有什么想法吗?
推荐答案
我不明白,回复在你的问题中:
I don't understand, the response is in your question :
select strftime('%m', dateField) as Month ...
这篇关于从 SQLite 中的 DATETIME 获取月份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文