I have a set of dates that I need to compare and I've tried a few different methods but nothing seems to work.
The recordset value comes from an MS SQL database set to smalldatetime, so a printout of a date value would be:
7/12/2004 10:45:00 AM
I tried the following comparison methods but nothing seems to work:
Any suggestions on making a correct comparison are greatly appreciated.
The recordset value comes from an MS SQL database set to smalldatetime, so a printout of a date value would be:
7/12/2004 10:45:00 AM
I tried the following comparison methods but nothing seems to work:
Code:
if datevalue(rsODN("Transaction_Date")) >= "05/04/2004" and datevalue(rsODN("Transaction_Date")) <= "11/21/2004" then
pr = "$29.95"
end if
if datevalue(rsODN("Transaction_Date")) >= "#05/04/2004#" and datevalue(rsODN("Transaction_Date")) <= "#11/21/2004#" then
pr = "$29.95"
end if
if datevalue(rsODN("Transaction_Date")) >= "'05/04/2004'" and datevalue(rsODN("Transaction_Date")) <= "'11/21/2004'" then
pr = "$29.95"
end if
Any suggestions on making a correct comparison are greatly appreciated.