Print this page

How to find if a particular date falls in current quarter or not

Knowledge Article Number 000003344
Description

How to find if a particular date falls in current quarter or not

Resolution

If the fiscal year definition is

Q1 - Dec last year, Jan current year, Feb current year

Q2 - March current year, April current year , May current year and so on,

and date in question is say Close Date, following will be the formula to determine if CloseDate DOES NOT fall in Q1 -

(

YEAR(today())=YEAR(CloseDate) &&

(MONTH(today())=1 || MONTH(today())=2)) &&

(MONTH(CloseDate)<>1 && MONTH(CloseDate)<>2)

) ||

(

(YEAR(today())-1)=YEAR(CloseDate) &&

(MONTH(today())=1 || MONTH(today())=2)) &&

(MONTH(CloseDate)<>12)

)

For Q1, following formula will determine if Close Date falls in Q1

(

YEAR(today())=YEAR(CloseDate) &&

(MONTH(today())=1 || MONTH(today())=2)) &&

(MONTH(CloseDate)=1 || MONTH(CloseDate)=2)

) ||

(

(YEAR(today())-1)=YEAR(CloseDate) &&

(MONTH(today())=1 || MONTH(today())=2)) &&

(MONTH(CloseDate)=12)

)

Same can be done for the other quarters.

What is important is the YEAR and the MONTH when the fiscal year starts.

For e.g. 

If Q2 is March current year, April current year , May current year

and date in question is say Close Date, following will be the formula to determine if CloseDate DOES NOT fall in Q2 -

YEAR(today())=YEAR(CloseDate) &&

(MONTH(today())=3 || MONTH(today())=4) || MONTH(today())=5) &&

(MONTH(CloseDate)<>3 && MONTH(CloseDate)<>4 && MONTH(CloseDate)<>5)

For Q2, following formula will determine if Close Date falls in Q2

(

YEAR(today())=YEAR(CloseDate) &&

(MONTH(today())=3 || MONTH(today())=4 || MONTH(today())=5) &&

(MONTH(CloseDate)=3 || MONTH(CloseDate)=5 || MONTH(CloseDate)=6)

)





promote demote