calculate end date from start date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eastbat
    New Member
    • Dec 2011
    • 2

    calculate end date from start date

    Hi Everyone,

    I would like to create an [end date] from the [start date]in ms access form.
    The formula is simple :([start date] + 3month) - (day of the start date-1day)

    for example:
    a.) if the start date is 01.01.2011 than the end date will be 03.31.2011 or

    b.) if the start date is 15.02.2011 than the end date will be 14.05.2011

    I've tried with this DateSerial(Year ([start date]);Month([start date])+3;0)
    but I stucked because anytime I got the last day of the month.
    Pls help me, thanks in advance.
  • sierra7
    Recognized Expert Contributor
    • Sep 2007
    • 446

    #2
    Hi,
    Try
    Code:
    Me!txtFinish = DateAdd("d", -1, DateAdd("m", 3, Me!txtStart))
    I'm not sure whether you are using UK or US date formats. (a) seems to be US and (b) UK, but the function should pick up your system settings.

    S7

    Comment

    • eastbat
      New Member
      • Dec 2011
      • 2

      #3
      Hi Sierra7

      It's absolutely PERFECT !!!
      Thank you very much.

      Comment

      Working...