Period_Start_Date__c and Period_End_Date__c. are date format fields
I am trying to get the formula to check if the period is in Q1 of a leap year so the added day is considered in the final calculation if both criteria are true.
text(If(And (OR(MOD( YEAR(Period_Start_Date__c), 400 ) = 0, AND(MOD( YEAR(Period_Start_Date__c), 4 ) = 0, MOD( YEAR(Period_Start_Date__c), 100 ) != 0) ), CEILING( MONTH (Period_Start_Date__c) / 3 = 1)), (Period_End_Date__c - Period_Start_Date__c) + 1)),(Period_End_Date__c - Period_Start_Date__c ))
1 answer
Here's the proper Syntax:
text(
IF(
And(
OR(MOD( YEAR(Period_Start_Date__c), 400 ) = 0,
AND(MOD( YEAR(Period_Start_Date__c), 4 ) = 0,
MOD( YEAR(Period_Start_Date__c), 100 ) != 0)),
CEILING( MONTH (Period_Start_Date__c) / 3) = 1),
(Period_End_Date__c- Period_Start_Date__c) + 1,(Period_End_Date__c- Period_Start_Date__c))
)
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer thumbs up if that answer is helpful to you. Thx