Bill_misc_IT Posted August 29, 2008 Posted August 29, 2008 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?
comment Posted August 29, 2008 Posted August 29, 2008 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now