Trimester Query

Dirtrider929

Registered User.
Local time
Today, 11:14
Joined
Nov 12, 2013
Messages
32
I am trying to split the year into thirds instead of the quarter. I will be needing to set the criteria to only show me the previous year from the current year. Can this be done in one query?
 
I would create a custom function in a Module to do this. You pass it a date, it divides the month number by 4 and returns the integer part of that calculation.

Give it a shot and see what you get. Post back here what you have tried or where you are stuck. .
 
I don't fully understand your question. How does Trimester: Int(Month([DateField])/4) not do what you need?
 
Thank you both. Trying to get this Access thing figured out.
 
into thirds instead of the quarter.

and its probably a little more complex than that.... because int(2/4) will return 0 while 4/4 will return 1 and 12/4 will be the only one to return 3

Thus to "get it right"
Int((Month([DateField])+3)/4)
or
Int((Month([DateField])-1)/4)+1

That offcourse will only work if you have 3 equal trimesters, not like school trimesters which do not include the school holidays.
 
Oh and to only return "last year" have any date field and add this into the criteria:
<Dateserial(year(date),1,1)
 

Users who are viewing this thread

Back
Top Bottom