我想做个ASP 日期查询 求助 SQL ACCESS

2025-01-19 02:33:03
推荐回答(1个)
回答1:

连数据库:
Set Recordset1 = Server.CreateObject("ADODB.connection");
Recordset1.ActiveConnection = MM_rzh_STRING;
第一句:
select * from rizhi where tjdata>=to_date(datastart,'yyyy-MM-dd') and tjdata<=sysdate;
第二句:
select * from rizhi where tjdata<=to_date('2007-01-01','yyyy-MM-dd');
第三句:
select * from rizhi where tjdata>=to_date(datastart,'yyyy-MM-dd') and tjdata<=to_date(dataend,'yyyy-MM-dd');