我用Microsoft.Jet.OLEDB.4.0导入Excel文件,导入的时间数据怎么没有秒的值,只剩下年月日时分
连接字符串如下
string sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + StrPath + ";" + "Extended Properties='Excel 8.0;HDR=No;IMEX=1;'";
连接字符串如下
string sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + StrPath + ";" + "Extended Properties='Excel 8.0;HDR=No;IMEX=1;'";
设置为:
yyyy-mm-dd hh:mm:ss
点中execl的列,设置单元格格式,自定义.
设置为:
yyyy-mm-dd hh:mm:ss