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!
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
Where is this used? May be this:
AddMonths(Date(Subscription_Start_Date__c), Max(Subscription_Duration))
In the script. Gives an error saying invalid expression.
I don't see why your original expression won't work in the script. Do you have Subscription_Start_Date__c and Subscription_Duration in one table when you are doing this AddMonths calculation???
Yes.
How about this?
AddMonths(Date#(Subscription_Start_Date__c, 'MM/DD/YYYY'), Subscription_Duration__c)
Not working
Why don't you paste the screenshot of the error you have received
Writing the max function is giving error while reloading the script 'Invalid expression'. Omitting the max function, the field 'test' is not displaying any values.
can you run your script without this and send a screenshot for the Subscription_Start_Date__c field.... seems like QlikView doesn't interpret as a date field.
Best,
Sunny