Hi,
I am trying to sum a field (Minutes) only if the date field (ServiceDate) is 7 days prior to todays date. Any suggestions to help would be appreciated? I have played around with the IF statement, yet not having much luck.
Hi,
I am trying to sum a field (Minutes) only if the date field (ServiceDate) is 7 days prior to todays date. Any suggestions to help would be appreciated? I have played around with the IF statement, yet not having much luck.
Just check if below gives some guidelines :
ThanksCode:SELECT Sum(myTable.TheMinutes) AS SumOfTheMinutes FROM myTable WHERE ( ( (myTable.ServiceDate) Between Date() And Date()-7 ) );
That worked....Thanks so much!
Glad you found it helpful.
Thanks![]()