VBA string to SQL works for 'WHERE from other non-date column'
I've tried several attempts: CAST in query, converting both to integers, etc.
Query returns a 0 or first few columns sometimes are the date range for all rows when running in VBA, but when pasting the VBA SQL string into SQL, it works.
'datecol is type Date in SQL
Dim conn as ADODB.Connection
Dim rs as ADODB.Recordset
Dim strdate, sqldate as String
strdate = "11/10/20"
sqldate = "SELECT * FROM dbTable1 WHERE datecol = '" & strdate & "'";
Set rs = conn.Execute(sqldate)
arrayRows = rs.GetRows
rs.Close
arrayRowsTranspose = Application.Transpose(arrayRows)
Datemay contain a Time-part.