问题(1)
sql server r的日期到了excel里显示的是不对的,跟乱吗差不多这个是什么原因,请指点,我的日期字段的类型是datetime类型
问题(2)
For i = 0 To Adodc1.Recordset.RecordCount - 1
For j = 0 To Adodc1.Recordset.Fields.Count - 1
If Adodc1.Recordset.Fields(j) <> "" Then
If Adodc1.Recordset.Fields(j).Type = adDBDate Then
newsheet.Range(j + 1).NumberFormatLocal = "yyyy-mm-dd"
newsheet.Cells(i + 2, j + 1) = Adodc1.Recordset.Fields(j)
而且不能认出sqlserver中的日期格式If Adodc1.Recordset.Fields(j).Type = adDBDate Then这条语句一直就没有执行
sql server r的日期到了excel里显示的是不对的,跟乱吗差不多这个是什么原因,请指点,我的日期字段的类型是datetime类型
问题(2)
For i = 0 To Adodc1.Recordset.RecordCount - 1
For j = 0 To Adodc1.Recordset.Fields.Count - 1
If Adodc1.Recordset.Fields(j) <> "" Then
If Adodc1.Recordset.Fields(j).Type = adDBDate Then
newsheet.Range(j + 1).NumberFormatLocal = "yyyy-mm-dd"
newsheet.Cells(i + 2, j + 1) = Adodc1.Recordset.Fields(j)
而且不能认出sqlserver中的日期格式If Adodc1.Recordset.Fields(j).Type = adDBDate Then这条语句一直就没有执行
因为你的SQL中的DATETIME字段是用双精度的,所以......试试持,我也没试.