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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -