Jump to content

This topic is 8266 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

This should be fairly simple, but I can't get it to work:

I have a "Contract Start" Date Field and need to calculate the "Contract End" date based upon a "Contract Period" (Months) field, but I'm struggling to get calendar months to increment. If you attempt this using days, you get a different date next year.

For example, if the contract start is 14/06/2002 and the period is 12 Months, the Contract End needs to be 14/06/2003.

Hope this makes sence - thanks.

Posted

This is down to DJ -

NextReview=Date(Day(Contract Start),Month(Contract Start)+ Contract Period,Year(Contract Start))

OR

The following 'roll over' once the Contract End date has been reached.

If(Status(CurrentDate) < Contract Start,Contract Start,

If(

Mod(Month(Status(CurrentDate))-Month(Contract Start)+

12*(Year(Status(CurrentDate))-

Year(Contract Start)),

Contract Period)=0,

Date(Month(Status(CurrentDate))+

12*(Year(Status(CurrentDate))-Year(Contract Start))+

Contract Period*(Day(Status(CurrentDate))>= Day(Contract Start)),

Day(Contract Start), Year(Contract Start))

,

Date(Month(Status(CurrentDate))+

12*(Year(Status(CurrentDate))-

Year(Contract Start))-

Mod(

Month(Status(CurrentDate))-Month(Contract Start)+

12*(Year(Status(CurrentDate))-Year(Contract Start)),

Contract Period)+

Contract Period,

Day(Contract Start),

Year(Contract Start))

)

)

Posted

Thanks for the reply

Tried the more simple 1st suggestion, as this is all thats required, but I get a strange result:

Fields

Start Date (date) = 14/06/2002

Period (Number) = 12

End Dat (Calculation) = 18/02/2003??

Can you explain this? shocked.gif

This topic is 8266 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.