The dates used in select (at Microsoft) are defined as: "#" + month + "/" + day + "/" + year + "#"
field day is number 01.02 ---, 31
field month - number 01.02 ... 12
field year 2014, 2015 ... etc.
you can build a SQL field dynamically
es. in vbscript
dt1="#"&month(date1)&"/"&day(Date1)&"/"&year(Date1)&"#" dt2="#"&month(date2)&"/"&day(Date2)&"/"&year(Date2)&"#"
and then you can use the select in the SQL field
where in the Orders table the field OrderDate x is indicated.
SQL="select * from Orders where OrderDate Between " & dt1 & " and " dt2
now you can access the database
source share