Results 1 to 4 of 4
  1. #1
    harrie is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    8

    calculations on date

    i have a start_date in format mm/dd/yyyy , then i create attributes called N_O_D and end_date

    example ::

    start_date N_O_D end_date
    11/20/2016 3 11/22/2016


    if i key in 4 in N_O_D , then the end_date becomes 11/23/2016
    if i key in 12 , end_date becomes 12/01/2016


    how to do the calculation on date ?

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    You haven't given us much to work with. If these are fields in a table, don't store the end date. Store only the Start_Date and N_O_D, and calculate the End_Date in a query, using the DateDiff function.

    PS - the format of the start date (or any date) is only for display. It is not stored in the database table in that format.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    When you say
    if i key in 4 in N_O_D , then the end_date becomes 11/23/2016
    if i key in 12 , end_date becomes 12/01/2016
    is this in a table, query or form?

    Also look at the DateAdd Function

  4. #4
    harrie is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    8
    John_G thx, i success do it with your guide.
    ssanfuN_O_D is in the table whereby it can be key in by user in any values.

    and i solved it , thx

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

Similar Threads

  1. date time calculations
    By omegads in forum Queries
    Replies: 8
    Last Post: 09-09-2016, 07:54 AM
  2. Date Calculations in Access
    By tj105 in forum Access
    Replies: 5
    Last Post: 09-14-2015, 03:07 PM
  3. IIF statement in Date calculations
    By wnicole in forum Access
    Replies: 1
    Last Post: 09-18-2013, 02:26 PM
  4. Date Calculations
    By Polarbilly in forum Forms
    Replies: 2
    Last Post: 06-01-2011, 12:55 PM
  5. Date calculations
    By NOTLguy in forum Access
    Replies: 10
    Last Post: 10-09-2010, 06:41 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