首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

Access2007数据库的日期查询方法是怎么的

2012-08-13 
Access2007数据库的日期查询方法是怎样的?我用了一下代码:Select * from tb_Weight whereWeight_DateTime

Access2007数据库的日期查询方法是怎样的?
我用了一下代码:
Select * from tb_Weight where  
 Weight_DateTime >= #2012-07-03 13:11:43# and Weight_DateTime <= #2012-07-03 16:11:43#

或者:
Select * from tb_Weight where  
 Weight_DateTime between #2012-07-03 13:11:43# and #2012-07-03 16:11:43#

都报错啊,该如何写啊?Access2003与Access2007在时间查询代码上一致吗?谢谢!

[解决办法]
Select * from tb_Weight where
 Weight_DateTime >= '2012-07-03 13:11:43' and Weight_DateTime <= '2012-07-03 16:11:43'

试试
[解决办法]
access查询日期要加 # ,不过你的字段是日期型的吗,报什么错
[解决办法]
数据库里面是2012-07-03 13:11:43这样的格式吗
[解决办法]
http://blog.csdn.net/xianfajushi/article/details/4773217

热点排行