By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,470 Members | 924 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,470 IT Pros & Developers. It's quick & easy.

datagridview select query from string to date

P: 2

I am using access database ,
to filter my datagridview I used

Expand|Select|Wrap|Line Numbers
  1. Sales_ItemsDataGridView.DataSource = Me.M_B_DATABASEDataSet.Sales_Items.Select(("Convert(category, 'System.String') LIKE '" & search2 & "'")
now my problem
my date is string in the Database
date format is 31/12/2001
and i want to filter the dategridview between 2 dates so i uesed

Expand|Select|Wrap|Line Numbers
  1. Sales_ListDataGridView.DataSource = Me.M_B_DATABASEDataSet.Sales_List.Select(("Convert(invoice_date, 'System.String')  <= '" & DateTimePicker2.Value & "' AND Convert(invoice_date, 'System.String')   >= '" & DateTimePicker1.Value & "'"))
but sure that gave me funny results as it considered the date as string...
but i failed to change the

Expand|Select|Wrap|Line Numbers
  1. ("Convert(invoice_date, 'System.String')
to date format
can any one help Please.....
Jun 15 '14 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.