How to automatically show current quarter?

latestgood

Registered User.
Local time
Today, 08:49
Joined
May 19, 2011
Messages
15
Hello,

I am trying to create user friendly form but I am stuck with date. I want access to automatically show current quarter when user enters the date. For example, if user enters July, I want access to automatically fill out the correct quarter. The problem I have is that our company's quarter starts in June. Any advice will be appreciated.
 
I'm not sure how you are planning to have the user enter the dates but you could use the Month(datevalue) function. It will return a number from 1-12 of the date value. You could then check if the month is between 6 and 8 for quater 1, 9-11 for quarter 2, etc.
 
Welcome to the forum.

Check out the DatePart() function.

Code:
DatePart("q", Date())
will return the quarter number of the current date.
 
Perhaps this schema (or at the very least a variation on it) will return the correct quarter required by the OP;
Code:
=DatePart("Q",DateAdd("M",-1,[DateValue]))
It should just be a matter of getting the correct offset in the DateAdd() portion of the statement.
 

Users who are viewing this thread

Back
Top Bottom