Months and Day Function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paolo

    #1

    Months and Day Function

    Friends I have a form whith three textboxes, A, B, C , D and F. The
    first two are used to store a starting and ending date data. The C, D
    and F should be a calculated form.

    In textbox A I will store a starting date (mm/dd/yyyy) and in the
    textbox B I will store the ending date.
    This is what I would like to do:

    Textbox C returns the number of days between A and B.
    Textbox D returns the number of weeks between A and B.
    Textbox F returns the number of months between A and B.

    Can anyone help me? Thanks.
  • Jeff Smith

    #2
    Re: Months and Day Function

    Look at the DateDiff function in the help file
    Here's the interval arguments for the first part of the function
    yyyy Year
    q Quarter
    m Month
    y Day of year
    w Weekday
    ww Week
    h Hour
    n Minute
    s Second

    Jeff



    "Paolo" <jprma@tin.it > wrote in message
    news:9f41a860.0 410300228.1a35d 0be@posting.goo gle.com...[color=blue]
    > Friends I have a form whith three textboxes, A, B, C , D and F. The
    > first two are used to store a starting and ending date data. The C, D
    > and F should be a calculated form.
    >
    > In textbox A I will store a starting date (mm/dd/yyyy) and in the
    > textbox B I will store the ending date.
    > This is what I would like to do:
    >
    > Textbox C returns the number of days between A and B.
    > Textbox D returns the number of weeks between A and B.
    > Textbox F returns the number of months between A and B.
    >
    > Can anyone help me? Thanks.[/color]


    Comment

    Working...