G
Gustaf
I'm importing data from Access into Excel. At one point, I need to import dates, and for some reason they don't match.
month = CDate(Cells(1, iCol))
....
Set rs = New ADODB.Recordset
rs.Open "SELECT * FROM Occupancy WHERE [Month] = " & month, cn, adOpenKeyset, adLockOptimistic
I have 3 records in Occupancy where Month is 2008-04-01. When the month variable is also 2008-04-01, I still get 0 on rs.RecordCount! The month is stored as a Date/Time (short date) in Access. I also tried
WHERE [Month] = " & Format(month, "yyyy-mm-dd")
Still no success.
Gustaf
month = CDate(Cells(1, iCol))
....
Set rs = New ADODB.Recordset
rs.Open "SELECT * FROM Occupancy WHERE [Month] = " & month, cn, adOpenKeyset, adLockOptimistic
I have 3 records in Occupancy where Month is 2008-04-01. When the month variable is also 2008-04-01, I still get 0 on rs.RecordCount! The month is stored as a Date/Time (short date) in Access. I also tried
WHERE [Month] = " & Format(month, "yyyy-mm-dd")
Still no success.
Gustaf