How to increment a date in Access 97

Is there anyone who knows how to increment a date in Access 97. I need to automatically add three months to the current default date.


Please be gentle as I'm new to this Access lark!!


Cheers.


Comments

  • : Is there anyone who knows how to increment a date in Access 97. I need to automatically add three months to the current default date.


    : Please be gentle as I'm new to this Access lark!!


    : Cheers.


    Use the DateAdd() function.



    DateAdd has the following parameters:

    Interval - yyyy, m, d

    Number - number of intervals to add

    Date - date to which the interval is added


    If you wanted to add 3 months to May 5, 1999,

    you would use the following:


    DateAdd("m", 3, #5/4/99#)


    Good Luck.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories