Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
Please can any one help me to determine the end date of a contract from the start date? I only have the contract period in numbers such as a two year contract beginning 1/1/2015 has a contract period 24.See example below. So Please how can I determine the end date with thesame format as the start date in a Table in Qlikview based on the Contract_Period@@?
ID Start_date End_date Contract_period E.g End_date
1 1/1/2015 ? 24 12/31/2016
2 2/10/2015 ? 24
3 5/15/2015 ? 24
4 6/10/2015 ? 24
5 7/20/2015 ? 24
Note: Date Format is "MM/DD/YYYY"
Maybe
Date(AddMonths(Start_date,Contract_Period),'MM/DD/YYYY')
Hi Clever, I added the statement to the Calendar script but it did not work.
Would you mind sharing your data or sample of your app?
Try this one:
date(AddMonths(date(StartDate,'DD/MM/YYYY'),ContractPeriod),'DD/MM/YYYY') as EndDate
Hope this will help!!
how about
Date(AddMonths(date(StartDate, 'MM/DD/YYYY'), ContractPeriod) - 1, 'MM/DD/YYYY')
Bu the problem is the Startdate and Contract Period reside in two different table. So using the Resident function it give me an error saying the contract period cannot be found.
Don't do the above in the calendar script, but in the actual table with the data.
So Kim Should I add as an expression?
Try at script level