how to access column of date/time data type from ms access

jaya3000

New member
Joined
Apr 16, 2006
Messages
2
Programming Experience
Beginner
hi , when i try to display a column from database (ms access) which is of date/time data type by selecting date from combo box using this statementsql = " select * from myTable where date_id=' " & cboDate.SelectedItem & " ' "it reports the following errorAn unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dllAdditional information: Cast from type 'DataRowView' to type 'String' is not valid. after that ,when i try this one it takes only date not time ,but i want to display both date and time how to change this format to take both date and time'sql = " select * from myTable date_id='" & CDate(cboDate.Text).ToString("MM/dd/yyyy") & "'"please help me
 
Back
Top