Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I'm trying to write a script that will get the date from one field, add 1 to the year and set another field with this new date. It's for an expiration date.

When I simply perform a calculation of "date" + 365, it doesn't always work out (leap years, odd months, etc.)

Is there an easy way to accomplish this?

Posted

Try:

Date ( Month ( StartDate ) ; Day ( StartDate ) ; Year ( StartDate ) + 1 )

This should return the same date a year from StartDate, with the exception of February 29 in a leap year which will return March 1 a year later.

This topic is 5931 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.