【发布时间】:2016-08-07 18:57:35
【问题描述】:
我在 Sqlite DB 中有一个表,有两个字段 Id 和 Date(Date 是文本类型)。 我在 c# 的表中存储了一些日期。现在我想获取匹配特定日期、月份和年份的记录。 我试过的查询是:
select strftime('%m', Date) from testTbl Where id = 3;
还有:
select Date(substr(Date, 0, 10)) as daa from testTbl Where id = 3;
但是这两个查询的结果总是空的。任何人都可以帮我解决这个问题吗?
【问题讨论】:
-
日期格式是什么?
-
c#日期字段的默认格式。 '8/7/2016 12:00:00 AM'
标签: sqlite