I am taking the dates through datepicker controls, but not achieving any success, anyone have any suggestions.
I tryed:
Dim fromDate As New DateTime(startdate_picker_search_supplierinvoice.Text)
Dim toDate As New DateTime(enddate_picker_search_supplierinvoice.Text)
query &= "supplier_invoice_date >= '" & fromDate & "' AND supplier_invoice_date <= '" & toDate & "'"
invoicesresults_datagrid_search_supplierinvoice.DataSource = SelectDataTable(dt, query)
Error: Conversion from string “Tuesday, July 17, 2012” to type ‘Long’ is not valid.
Don’t use the
.Textproperty which is returning the full written out date. Instead use:and then the `.ToString’ extension.