date query

  • Thread starter Thread starter lez
  • Start date Start date
L

lez

I am trying to run a group query Where the date is Now() and want a count of
date to show the numbers of calls made.

I have tried the obvious:

SELECT tblinvest_calls.contactID, Sum(tblinvest_calls.df1) AS SumOfdf1
FROM tblinvest_calls
WHERE (((tblinvest_calls.df1)=Now()))
GROUP BY tblinvest_calls.contactID;

But am getting no results when I run the query, can anyone help please?
 
I am trying to run a group query Where the date is Now() and want a count of
date to show the numbers of calls made.

I have tried the obvious:

SELECT tblinvest_calls.contactID, Sum(tblinvest_calls.df1) AS SumOfdf1
FROM tblinvest_calls
WHERE (((tblinvest_calls.df1)=Now()))
GROUP BY tblinvest_calls.contactID;

But am getting no results when I run the query, can anyone help please?

Since Now() includes the time of day, you will not get any records
returned as no records will ever have exactly the same date and time
value as when th query is run.

If the stored date does NOT include a time value, use Date() instead
of Now().

If the stored date DOES include a time value, use

WHERE DateValue(tblinvest_calls.df1)=Date()
 
Cheers Fred, perfect answer


fredg said:
Since Now() includes the time of day, you will not get any records
returned as no records will ever have exactly the same date and time
value as when th query is run.

If the stored date does NOT include a time value, use Date() instead
of Now().

If the stored date DOES include a time value, use

WHERE DateValue(tblinvest_calls.df1)=Date()
 
Back
Top