3 Replies Latest reply on Sep 6, 2018 7:31 AM by Soham Wadekar

# Getting the last date of the contract based on start date and length of contract

HI Guys

i am creating a report and need to find the contract end date based on the start date and length of the contract (in months).

For example i have two dates in my attached workbook

date: 25/07/2017  Length: 12   i need to return the end date here of 31/05/2018

date: 02/03/2018  Length 2     i need to return the end date here as 30/04/2018

can this be done?

i have attached an example

• ###### 1. Re: Getting the last date of the contract based on start date and length of contract

Imran,

Can you try this

End Date for 12 months: DATE(DATETRUNC('month',DATEADD('month',13,[date]))-1)

End Date for 2 months: DATE(DATETRUNC('month',DATEADD('month',3,[date]))-1)

• ###### 2. Re: Getting the last date of the contract based on start date and length of contract

Could you explain the logic  to calculate end date from start and length?

Suspecting either of value is incorrect.

Thanks,

Shin

• ###### 3. Re: Getting the last date of the contract based on start date and length of contract

Hi Imran,

You can do this