Hi everyone,
I have an application where I link to Outlook from Access. The purpose of the database is to count how many Sent and Received Emails each person receives per week.
The following code results in the output in the first table below and I need to have the output show as it is in table 2 below. I think the problem is that the date/time is in the Sent and Received fields. I changed the format of the table that contains the data to Short Date but if I hold the cursor over the date it shows date and time (10/10/2006 2:18:28 PM). Is there a way to modify the SQL below to only select the date rather than the data and time?
10/10/2006 2:18:28 PM
Table 1 - I get this:
DF_EmailSent Query
To CountOfSender Name Sent
Bennett 1 10/10/2006
Bennett 1 10/10/2006
Bennett 1 10/11/2006
Bennett 1 10/11/2006
Heess 1 10/9/2006
adelphia 1 10/8/2006
adelphia 1 10/10/2006
Table 2 - I am trying to get this:
DF_EmailSent Query
To CountOfSender Name Sent
Bennett 4 10/10/2006
Heess 1 10/9/2006
adelphia 2 10/8/2006
I have an application where I link to Outlook from Access. The purpose of the database is to count how many Sent and Received Emails each person receives per week.
The following code results in the output in the first table below and I need to have the output show as it is in table 2 below. I think the problem is that the date/time is in the Sent and Received fields. I changed the format of the table that contains the data to Short Date but if I hold the cursor over the date it shows date and time (10/10/2006 2:18:28 PM). Is there a way to modify the SQL below to only select the date rather than the data and time?
Code:
SELECT DF_Sent.To, Count(DF_Sent.[Sender Name]) AS [CountOfSender Name], DF_Sent.Sent
FROM DF_Sent
GROUP BY DF_Sent.To, DF_Sent.Sent
HAVING ((([DF_Sent.Sent]) Between Date()-Weekday(Date())+1 And Date()-Weekday(Date())+7))
ORDER BY DF_Sent.To;
10/10/2006 2:18:28 PM
Table 1 - I get this:
DF_EmailSent Query
To CountOfSender Name Sent
Bennett 1 10/10/2006
Bennett 1 10/10/2006
Bennett 1 10/11/2006
Bennett 1 10/11/2006
Heess 1 10/9/2006
adelphia 1 10/8/2006
adelphia 1 10/10/2006
Table 2 - I am trying to get this:
DF_EmailSent Query
To CountOfSender Name Sent
Bennett 4 10/10/2006
Heess 1 10/9/2006
adelphia 2 10/8/2006