• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 488
  • Last Modified:

How make end date 1 year after start date

I have two date fields on a form.  If I enter, for example 7/1/2013 in the start date field I want the end date field to be one year after the start date.

What is the after update code for the start date field?
0
SteveL13
Asked:
SteveL13
  • 3
  • 3
1 Solution
 
Rey Obrero (Capricorn1)Commented:
=dateadd("yyyy", 1, [StartDate])
0
 
SteveL13Author Commented:
Will that also account for leap year?
0
 
SteveL13Author Commented:
And I had to add

-1

to the end.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Rey Obrero (Capricorn1)Commented:
what exactly do you mean?

this

dateadd("yyyy",1,date())
1/18/2015


dateadd("yyyy",1,date()-1)
1/17/2015
0
 
SteveL13Author Commented:
What I mean is if I start with 7/1/2013 and want to end with 6/30/2014 I have to have:

    Me.txtEndDate = DateAdd("yyyy", 1, [txtStartDate]) - 1

It works!
0
 
Rey Obrero (Capricorn1)Commented:
that is correct...
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now