Posts: 477
Name: Chip Johns
Location: Savannah Georgia
|
Ok,
I've racked my brain. Tried to figure this out.. Help...!
Trying to figure out how to retrieve info within a date range. Here is what I'm doing
Code:
Dim dDateFrom
dDateFrom=FormatDateTime(1/1/2008,2)
Dim dDateTo
dDateTo=FormatDateTime(1/20/2008,2)
strQ1 = "SELECT *"
strQ1 = strQ1 & " FROM smeTracking"
strQ1 = strQ1 & " WHERE smTrDate BETWEEN " & dDateFrom & " AND " & dDateTo
strQ1 = strQ1 & " ORDER BY smTrDate"
strQ1 = strQ1 & ";"
objRS1.Open strQ1
No Errors. Just no results...
What's interesting is that when I change to NOT BETWEEN... All the records show.!?
What am I missing here!?
Thanks for any assistance.
CHip
Last edited by ChipJohns : 03-20-2008 at 10:21 AM.
|