You need to sign in to do that
Don't have an account?
Jennifer Johnson 8
formula error
I have the below formula that has been working fine, until this month...
DATE(
year(End_of_Mth__c)
+ floor((month(End_of_Mth__c) + 4)/12) + if(and(month(End_of_Mth__c)=12,4>=12),-1,0)
,
if( mod( month(End_of_Mth__c) + 4 , 12 ) = 0, 12 , mod( month(End_of_Mth__c) + 4 , 12 ))
,
min(
day(End_of_Mth__c),
case(
max( mod( month(End_of_Mth__c) + 4 , 12 ) , 1),
9,30,
4,30,
6,30,
11,30,
2,28,
31
)
)
)
when my End of Mth date is 8/31/2014 the date being returned is 12/31/2015 instead of 12/31/2016. All other months are working fine (before and after 8/31/2014) - I can't figure out why just that date is messing up?
Thank you!!
DATE(
year(End_of_Mth__c)
+ floor((month(End_of_Mth__c) + 4)/12) + if(and(month(End_of_Mth__c)=12,4>=12),-1,0)
,
if( mod( month(End_of_Mth__c) + 4 , 12 ) = 0, 12 , mod( month(End_of_Mth__c) + 4 , 12 ))
,
min(
day(End_of_Mth__c),
case(
max( mod( month(End_of_Mth__c) + 4 , 12 ) , 1),
9,30,
4,30,
6,30,
11,30,
2,28,
31
)
)
)
when my End of Mth date is 8/31/2014 the date being returned is 12/31/2015 instead of 12/31/2016. All other months are working fine (before and after 8/31/2014) - I can't figure out why just that date is messing up?
Thank you!!
DATE(
year(SLAExpirationDate__c)
+if(month(SLAExpirationDate__c)>8,1,0)
,
if( mod( month(SLAExpirationDate__c) + 4 , 12 ) = 0, 12 , mod( month(SLAExpirationDate__c) + 4 , 12 ))
,
min(
day(SLAExpirationDate__c),
case(
max( mod( month(SLAExpirationDate__c) + 4 , 12 ) , 1),
9,30,
4,30,
6,30,
11,30,
2,28,
31
)
)
)
All Answers
year(End_of_Mth__c) =2014
+ floor((month(End_of_Mth__c) + 4)/12) =(8+4)/12=1
+ if(and(month(End_of_Mth__c)=12,4>=12),-1,0) =if( AND(8=12, 4>=12),-1,0))=0 Inner AND expression is always false as 4>=12 is always false and would take 0 as the value.
Kindly mark this question as solved if your query is resolved
Every other date in the End of Mth field is returning the correct Fourth Month date - only End of Mth = 8/31/2014 is incorrect.
thank you
DATE(
year(SLAExpirationDate__c)
+if(month(SLAExpirationDate__c)>8,1,0)
,
if( mod( month(SLAExpirationDate__c) + 4 , 12 ) = 0, 12 , mod( month(SLAExpirationDate__c) + 4 , 12 ))
,
min(
day(SLAExpirationDate__c),
case(
max( mod( month(SLAExpirationDate__c) + 4 , 12 ) , 1),
9,30,
4,30,
6,30,
11,30,
2,28,
31
)
)
)