码迷,mamicode.com
首页 > 数据库 > 详细

在SQLite Expert上用日期类型字段作为条件查询时注意日期的格式化

时间:2015-07-14 13:20:05      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:

经验之谈:

情况一:没有查询结果

select * from t_Records where 1==1 and R_CheckInTime > ‘2015-7-12 18:47:00‘ and  R_CheckInTime < ‘2015-7-18 18:48:00‘

情况二:得到正确结果

select * from t_Records where 1==1 and R_CheckInTime > ‘2015-07-12 18:47:00‘ and  R_CheckInTime < ‘2015-07-18 18:48:00‘


注意:

    日期的格式化 是 DateTime.ToString("yyyy-MM-dd hh:mm:ss");

在SQLite Expert上用日期类型字段作为条件查询时注意日期的格式化

标签:

原文地址:http://www.cnblogs.com/wjshan0808/p/4644940.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!