In my application i want to filter Data in a datagrid according to date.
my database have one datetime field .and i want to filter data from one date to other.

This is my code. but have some error in query.
pls help. i'm confused with its syntax.




ssql = " SELECT * FROM Agreements WHERE ReturnedToOn BETWEEN '" DateTimePicker1.value.ToString()'" AND '"DateTimePicker2.value.ToString()'""

sqlda = New OleDbDataAdapter(ssql, sqlcon)

sqlds = New DataSet
sqlds.Clear()

sqlda.Fill(sqlds, "ssql")
DataGrid1.DataSource = sqlds.Tables(0)

sqlcon.Close()