and I need to write a query that will only get records in a certain date-time range (Between startHour and endHour, both of type Date). I am struggling to come up with a SELECT statement that will do this.
I'm working in VB under Excel accessing a ACCESS db using ADODB.
I'm thinking along the lines of
strSQL = "SELECT Year & ""/"" & Month & ""/"" & Day & "" "" & Hour -1 & "":00"" AS StartHour, Data FROM table WHERE ?????????????"
In Access you can use the DateSerial function to convert your data to a microsoft date value. I'd recomment that you create and store a query that does this for you and then connect to the query from Microsoft Excel.