Results 1 to 4 of 4
  1. #1
    Costa is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    13

    Count difference between two dates

    Hello all ..

    I want to add formula in a field to count the difference between two dates that are stored in another fields.

    Example:

    Field 1 : Start Date : 1 march 2010
    Field 2 : End Date : 15 march 2010
    Field 3 : Number of days between field 1 and field 2

    What is the formula to count the number of days between field 1 and field 2 ?

    OR just count it without adding it to a field

    Waiting for your help .. Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Check out the DateDiff() function.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Costa is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    13
    Can you please give me the code ?

    my fields name are :

    Startdate
    End-date
    Diffdate

    I think DateDiff() is to add the dates manually not to take them from records in fields.

    Thanks for your help mate

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    There should be a pretty good description of the function and its arguments in Help. It can certainly get its values from fields.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Difference between 2 identical tables.
    By leepan2008 in forum Access
    Replies: 1
    Last Post: 09-28-2009, 07:36 PM
  2. difference between drivers
    By tomc1 in forum Access
    Replies: 0
    Last Post: 08-04-2009, 10:41 AM
  3. Count Dates within Date Range
    By eckert1961 in forum Queries
    Replies: 2
    Last Post: 03-08-2009, 10:58 AM
  4. Time difference
    By jguidry in forum Programming
    Replies: 1
    Last Post: 11-15-2008, 12:41 PM
  5. Replies: 1
    Last Post: 11-08-2008, 10:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums