Public Class Form1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim EndDate As Date = DateTimePicker2.Value.Date.AddDays(1)
Me.NY_VWRUBBERRECBindingSource.Filter = "recinsdate >= '" & DateTimePicker1.Value.Date.ToString("s") & "' AND recinsdate <'" & EndDate.ToString("s") & "'"
Console.WriteLine(Me.NY_VWRUBBERRECBindingSource.Filter)
' Me.StudentBindingSource.Filter = "TO_DAY >= '" & DateTimePicker1.Value.ToString("s") & "' AND TO_DAY <= '" & DateTimePicker2.Value.ToString("s") & "'"
End Sub