c# - OleDb return Date Column value with time -


i have excel file(.xls) contain date column without time value. trying read file , put in datatable connection string below:

provider=microsoft.jet.oledb.4.0;data source=c:\users\test\desktop\1.xls; extended properties="excel 8.0;hdr=yes;imex=1;importmixedtypes=text" 

excel file data

enter image description here

oledb return datem value time. 7/20/1995 12:00:00 am

datatable data

enter image description here

but want datem column value without time. have idea have solve problem.

thanks.

.net framework's datetime consist of date , time. can't separate time part datetime, instead can use custom format displaying records.

string str = datetime.today.tostring("mm/dd/yyyy"); 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -