Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a start date 02/15/2017. I need to add number of months to get the end date. Suppose no of months=12 will give me the end date 02/15/2018. The number of months will come from a field. I know the function AddMonths but it's only working when I am giving the number of months explicitly.
AddMonths(date(Subscription_Start_Date__c),12) is working.
But how do I write the function if the number of months is coming from another field?
AddMonths(date(Subscription_Start_Date__c),Subscription_Duration) doesn't work.
Thanks!
I am using the Date function to convert it.
I don't understand.... this should work
Date(AddMonths(Subscription_Start_Date__c, Subscription_Duration__c)) as test
Doesn't work
Is Subscription_Duration__c a number field is the last thing I can ask you to check.... otherwise I have no idea... Unless you are able to share a sample, I have no idea why it isn't working
Date(AddMonths(Subscription_Start_Date__c, (Subscription_Duration__c * 1))) as test
num# worked
You are trying to use a field (with the __C) that's been renamed. Try using [Subscription Start Date] instead in your AddMonths statement.