M
mscertified
I've been struggling with this for hours: I have records with date/time
column (having date AND time). I need to select based on date only. No matter
what I do when trying to select for 8/1/2007 to 8/31/2007, I NEVER get any
records for 8/31/2007. And YES there are 8/31/2007 records there. Seems like
all 8/31/2007 records are being taken as 8/1/2007. What am I doing wrong?
Here is my latest failed attempt:
SELECT DateValue(RecordDate) AS RecDate, RecordType, HowMany AS Num
FROM tblAddress
WHERE DateValue(RecordDate) >= NZ([forms]![frmPrint]![StartDate],#1/1/2000#)
And RecordDate <= NZ([forms]![frmPrint]![EndDate],#12/31/2999#);
column (having date AND time). I need to select based on date only. No matter
what I do when trying to select for 8/1/2007 to 8/31/2007, I NEVER get any
records for 8/31/2007. And YES there are 8/31/2007 records there. Seems like
all 8/31/2007 records are being taken as 8/1/2007. What am I doing wrong?
Here is my latest failed attempt:
SELECT DateValue(RecordDate) AS RecDate, RecordType, HowMany AS Num
FROM tblAddress
WHERE DateValue(RecordDate) >= NZ([forms]![frmPrint]![StartDate],#1/1/2000#)
And RecordDate <= NZ([forms]![frmPrint]![EndDate],#12/31/2999#);