I am importing an excel sheet to a DataTable in a window application using oledb and want to fetch only the date which is the first column in my excel sheet. I have entered only dates in this column. but DataTable is adding time to it which I don’t want.
How to get only date in the table?
I am importing an excel sheet to a DataTable in a window application using
Share
There is no
Datedata type in .NET. All date values come out asDateTime. You can get the date with a “0” time value usingdatevalue.Date.