Hi,
I'm having issues with the following code:
this statement is supposed to select records with field date1 >= 20 days ago
but it's not working as expected (according to the input date, the Select might return everything or nothing)
the filter for field "Resource" is working fine.
- the field "date1" is declared as a date field on the db table
- I tried with #date1# "date1" 'date1' within the SELECT statement, without success.
Any hint?
Thanks
kekko
I'm having issues with the following code:
Code:
Dim date1 as Date
[..]
date1 = date - 20 '20 days ago
oCm.CommandText = "Select * From mytable where resource = """ & resourcename & """ AND " & _
"date1 >= #" & date1 & "#"
Set rs = oCm.Execute(iRecAffected)
this statement is supposed to select records with field date1 >= 20 days ago
but it's not working as expected (according to the input date, the Select might return everything or nothing)
the filter for field "Resource" is working fine.
- the field "date1" is declared as a date field on the db table
- I tried with #date1# "date1" 'date1' within the SELECT statement, without success.
Any hint?
Thanks
kekko
Last edited: