Hope I can get some help here. I have the below code to filter between 2 dates. The problem is. It filters from start date till -end date. Hence, when I want to run a date search for 1/1/2013, I need to do. 1/1/2013 for datetimepicker1, and 2/1/2013 for datetimepicker2.
How can I correct this? How can I add +1 to the end date..
BindingSource1.Filter = String.Format("FromDate >= #{0:M/dd/yyyy}# AND ToDate <= #{1:M/dd/yyyy}#", _
DateTimePicker1.Value, _
DateTimePicker2.Value)
you could use datetime.addDays(1)