Neven Draskovic

Neven Draskovic

  • NA
  • 117
  • 138.3k

BindingSource.Filter problem with filtering by dates

Feb 10 2012 5:09 AM
Hey

I use the filter method of BindingSource to filter it by one or multiple conditions, one of conditions being Date. First problem is that when I try to filter with this expression (e.g Date = #2/10/2012#) it returns no results (although there should be some). I've gone around that by making everything a date span like Date => #2/9/2012# AND Date<= #2/11/2012# (the date format is mm/dd//yyyy). This span will give me only the events that happened on 10th of February 2012 (it is like the filter ignores the '=' sign). This works properly for all dates except for the first and the last day of a month (because I programmatically subtract/add one day and make a span so for the first of the month it would be #2/0/2012# and that is an obvious error).

Do you know some way to solve this problem?
Thanks


Answers (12)