hi
good evening
i am using the datagridview in c#.net in windows application
and more over iam getting the data from the excel sheet into the datadridview
but in total one column , there is the time like
"4:00 PM"
in excelsheet
but in the datagridview when iam loading with the sample data getting the same cloumn as
"12/30/1899 4:00 PM"
"4:00 PM"
"12/30/1899 4:00 PM"
But i need this one only "4:00 PM"
so it was also showing the default date , i had tried a lot but no use i show my sample code
OleDbConnection cnCSV = new OleDbConnection(strConnectionString);
cnCSV.Open();
OleDbCommand cmdSelect1 = new OleDbCommand(@sgh, cnCSV);
OleDbDataAdapter daCSV = new OleDbDataAdapter();
daCSV.SelectCommand = cmdSelect1;
DataSet ds = new DataSet();
DataTable dtCSV1 = new DataTable();
daCSV.Fill(dtCSV1);
daCSV.Fill(ds, comboBox1.SelectedItem.ToString());
daCSV = null;
cnCSV.Close();
return dtCSV1;
everything is working fine except that date part it as showing the extra part so please give me an idea , what to be changed to get the time as "4:00 PM" in datagridview in windwos application
please give me the suggestion fro me