代碼求指點,VB6+SQL
Dim rs As ADODB.Recordseti = 1
For j = 0 To rs.Fields.Count - 1
xlSheet.Cells(i + 1, j + 1) = rs.Fields(j)
If rs.Fields(j).Type = 7 Then
xlSheet.Cells(i + 1, j + 1).NumberFormat = "yyyy-mm-dd"
End If
Next j
其中rs.Fields(j).Type = 7沒起到作用,導出到EXCEL後數據類型沒有改變
我現在有二種數據類型要改Datetime,Smalldatetime