I am receiving this error: Error: Invalid Data. Review all error messages below to correct your data. Formula(s) that reference this field are no longer valid: Compiled formula is too big to execute (5,573 characters). Maximum size is 5,000 characters (Related field: Formula)
I have a formula to calculate whether NZ day light savings is on for a date. This is the logic: If the dateis after may and it's after the last sunday of septemeber. Or If the date is before may and before the 1st sunday in April
if(
Month( Attitude_presentation_date__c )>5
&&
Attitude_presentation_date__c>=
(DATE(YEAR( Attitude_presentation_date__c ),9+1,01) - 1
-
MOD( DATE(YEAR( Attitude_presentation_date__c ),9+1,01) - 1 - DATE(1900, 1, 7), 7))
,1,0)
+
if(
Month( Attitude_presentation_date__c )<5
&&
Attitude_presentation_date__c<=
(DATE(YEAR(Attitude_presentation_date__c ),4,01)
+
CASE( MOD( DATE(YEAR(Attitude_presentation_date__c ),4,01) - DATE(1900, 1, 7), 7), 0, 0, 1, 6, 2, 5, 3,
4, 4, 3, 5, 2, 6, 1,0))
,1,0)
I Then have a second formula that uses it to create calendar entries:
DATETIMEVALUE(
TEXT(YEAR(Attitude_presentation_date__c))+"-" +
TEXT(MONTH(Attitude_presentation_date__c))+"-" +
TEXT(DAY(Attitude_presentation_date__c))+" "+
Start_time__c
+":00")
-
if( Date_NZ_Daylight_savings_on__c >0, 1/24*13,1/24*12)
How can I modify this to get it under the 5000 compile limit?