-
How to filter Data in a datagrid according to date (VB.Net windows application)
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()
Similar Threads
-
By carzunli in forum Mobile
Replies: 1
Last Post: 11-15-2006, 06:13 AM
-
By daveryan78 in forum .NET
Replies: 0
Last Post: 08-04-2006, 06:29 AM
-
By software_develo in forum .NET
Replies: 4
Last Post: 05-19-2006, 03:58 PM
-
Replies: 1
Last Post: 05-02-2005, 02:21 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|