between two dates dataview filter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can you filter between two dates. I am developing an application that
displays the users calendar summary and they have the option of selecting
between 3 days, 5 days and 30 days pulled from a database. I am pulling the
full 30 days into a dataset so i dont have to go back to the server but i
want to be able to have them select one of the filters however the following
gives an error
Message "The expression contains unsupported operator 'Between'." String


dv.RowFilter = "Date_Of_Travel Between '" & DateTime.UtcNow & "' AND '" &
DateTime.UtcNow.AddDays(3) & "'"

is there anyway i can achieve what i need

TIA
 
Why not just do something so you end up with " SomeDate >=Date1 and SomeDate
<= Date2".

That has the same meaning - you just don't get the convenience of the
'between' operator.
 
Steven,

Be aware that the expression AFAIK needs a date inside a literal in the USA
style.

#MM:dd:yyyy"

Cor
 
Back
Top