D
DevilDog1978
SELECT DISTINCTROW OUTLOOK_APPROVEt1.To, OUTLOOK_APPROVEt1.Subject,
This looks like a mix of T-SQL and Access SQL...
If it's in Access, I'd use the DateSerial function (I'm not familiar with
date_sub if indeed that isn't just your placeholder).
WHERE Received >= DateSerial(Year(Date()), Month(Date()) - 1, 1) AND Received
< DateSerial(Year(Date()), Month(Date()), 1)
--
John W. Vinson [MVP]
The above worked yesterday. Today for some reason this query is not showing
emails from the past month. Does the format of the date matter?
OUTLOOK_APPROVEt1.Received, OUTLOOK_APPROVEt1.Contents,
OUTLOOK_APPROVEt1.CountOfImportance INTO OUTLOOK_APPROVEt2
FROM OUTLOOK_APPROVEt1
WHERE Received >= date_sub(curdate(), interval 1 month) and Received <=
date_sub(curdate(), interval 1 day)
WITH OWNERACCESS OPTION;
I am having trouble with the Where portion. I would like for this query to
reveal all the emails over the past physical month. Example February 1st I
would like to be able to collect the data for all of January. Any help would
be greatly appreciated.
This looks like a mix of T-SQL and Access SQL...
If it's in Access, I'd use the DateSerial function (I'm not familiar with
date_sub if indeed that isn't just your placeholder).
WHERE Received >= DateSerial(Year(Date()), Month(Date()) - 1, 1) AND Received
< DateSerial(Year(Date()), Month(Date()), 1)
--
John W. Vinson [MVP]
The above worked yesterday. Today for some reason this query is not showing
emails from the past month. Does the format of the date matter?