Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Dates Again (2002)

    Hi,

    I have a user that raises their royalty fees on sales after a store has been open for 2 years. I didn't have a problem calculating out what the projecting two year date was until they decided that the date should be the first of the month, 2 years later. So if the start date is 10/3/05 the anniv. date should be 10/1/07 not 10/3/07. How would I calculate that?

    Thanks,
    Leesha

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Dates Again (2002)

    You can use

    DateSerial(Year(DateAdd("yyyy",2,[StartDate])),Month(DateAdd("yyyy",2,[StartDate])),1)

    where StartDate is the field (or control) holding the start date. DateAdd("yyyy",2,[StartDate]) is the date exactly 2 years after the start date. DateSerial(Year(somedate), Month(somedate), 1) calculates the first day of the month for somedate.

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Dates Again (2002)

    Thanks for both the answer and moreso for the explanation!!

    Leesha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •