DateSerial Question

torquay

Registered User.
Local time
Today, 04:23
Joined
Dec 27, 2005
Messages
85
I am trying to calculate the sales figures using the formula below which gives me the sales results for June 2009 but for some reason I cannot seem to get it right to give me the results for May 2009 and April 2008, can anyone give me a pointer please.

=DSum("Total","AllSales","[OrderDate] Between DateSerial(Year(Date())-2, Month(Date()), 0) And DateSerial(Year(Date())-2, Month(Date())-1, 0)")

Thanks
 
Hello ..

Try this way..

Code:
=DSum("Total","AllSales","year([OrderDate]) =year(date())-2 and month([OrderDate])=month(date())-1 ")
 
Spot on, thank you.
 

Users who are viewing this thread

Back
Top Bottom