Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 486
  • 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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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