i am facing a problem when i fetch datetime column from Excel containing CSV format values then its show null because the value on datetime column is like 50:48:12 (HH:MM:SS), but when the value is under datetime range like 23:12:32 then its working perfect...
i want to fetch the Excel column with any datetime value e.g if the value is 50:48:12 then i got the same value on Query result
my snap code is below my OleDbDataAdapter connection is
string connString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=\"" + dir + "\\\";" + "Extended Properties=\"text;HDR=No;FMT=Delimited\"";
My query is
string query = "SELECT * FROM " + file;
OleDbDataAdapter dAdapter = new OleDbDataAdapter(query, connString);
try
{
dAdapter.Fill(dTable);
}
Values In Excel Sheet is 104:24:54 22:12:34 720:01:00
and if i open dataTable then
1. value in dTable.Tables[0].Rows[0] is null
2. value in dTable.Tables[0].Rows[1] is 10:12:34 PM
3. value in dTable.Tables[0].Rows[2] is null
please give me any solution