日期:2014-05-18  浏览次数:20715 次

关于c#和access日期类型的问题 求高手
在c#中一个字符串 比如“201212”这个日期,应该如何转换插入到Access数据库中的日期格式中,又是如何读取的呢 比如
select * from table where 日期=?? 这里应该怎么写呢

------解决方案--------------------
select * from tt where f1
between #2007-04-21 0:00:00# and #2007-04-24 23:59:59#

上述是最有效率的
如果一定要用日期,可以这么做,也是最有效率的

select * from tt where f1
between cdate( "2007-04-21 " & " 0:00:00 ") and cdate( "2007-04-24 " & " 23:59:59 " )
請參考:
http://community.csdn.net/Expert/topic/5429/5429916.xml?temp=.8885157