朱利安姜和尹世雅:Access中日期的问题

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 04:55:13
我用的是2003版本
前提:String examtime="2002-01-01 20:20:20"
问题:我的执行语句出错,不知道为什么
sql = "select * from test_result_info where starttime=#"+examtime+"#";
我还直接使过:
sql = "select * from test_result_info starttime=#2005-02-02 20:30:20#";
也抱错~请教各位大虾~帮忙指点下~小弟不胜感激
sql = \"select * from test_result_info where starttime=#\'\"+examtime+\"\'#\";
行不通~试了的

sql = \"select * from test_result_info where starttime=#\'\"+examtime+\"\'#\";

试试