fetching records from excel on the basis of date given by user.
-
Hello All How can i fetch the records from an excel sheet for a particular date. i want to pass the date from frontend and fetch only those records which satisfy the condition. my code is:---------- strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFilePath + ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1""" Dim cnCSV As New OleDbConnection(strConnectionString) cnCSV.Open() 'Dim cmdSelect As New OleDbCommand("SELECT * FROM [sheet1$] where [Tube Dia]=22", cnCSV) Dim cmdSelect As New OleDbCommand("SELECT * FROM [sheet1$] where [Invoice date]='14/04/2006'", cnCSV) cmdSelect.CommandType = CommandType.Text Dim daCSV As New OleDbDataAdapter daCSV.SelectCommand = cmdSelect Dim ds As New DataSet daCSV.Fill(ds) Oledb is treating my date as string how to convert my string parameter('14/04/2006') to date.