You need to sign in to do that
Don't have an account?
Mdavoodi
Create Expiration Date Formula based on Date and Terms selected
Hi there,
I am new to formula creation but have been a SFDC user for years. I am building some custom objects and trying to get this right from the start.
My business sells a warranty products and I am looking to create a formula field that calculates the "Expiration Date" based on a date field ("Purchase Date") and a picklist ("Term Months") which has 12, 24, 48, 60, etc. which resemble months)
Here is the formula I am using so far but I am getting an error stating "Error: Field Purchase_Date__c may no tbe used in this type of formula
DATE(YEAR(Purchase_Date__c)+(Term_Months__c/12),MONTH(Purchase_Date__c),DAY(Purchase_Date__c))
I am not sure why I am not able to use Purchase Date if its a Date Field...Any ideas?
I am new to formula creation but have been a SFDC user for years. I am building some custom objects and trying to get this right from the start.
My business sells a warranty products and I am looking to create a formula field that calculates the "Expiration Date" based on a date field ("Purchase Date") and a picklist ("Term Months") which has 12, 24, 48, 60, etc. which resemble months)
Here is the formula I am using so far but I am getting an error stating "Error: Field Purchase_Date__c may no tbe used in this type of formula
DATE(YEAR(Purchase_Date__c)+(Term_Months__c/12),MONTH(Purchase_Date__c),DAY(Purchase_Date__c))
I am not sure why I am not able to use Purchase Date if its a Date Field...Any ideas?
I created same setup and could fix the error, you need to get the value of the picklist field(Term Months) before using it to calculate month.
Hope this helps:)
DATE(YEAR(Purchase_Date__c)+(VALUE(Text(Term_Months__c))/12),MONTH(Purchase_Date__c),DAY(Purchase_Date__c))
Error: Field Purchase_Date__c may not be used in this type of formula
Purchase Date = Date field
Term Months = Picklist