Access Database: Create a formula to calculate a date.

Posted on 2007-08-02
Last Modified: 2008-06-21
I have a query of two tables (Income table & Project table). This query has 2 date fields & 3 dollar amount fields. Date #1 & Date #2 has information in it. I need to create the Date #3 based on a formula of Date #2 plus 60 days. Once the 3rd date is calculated, that information needs to go into it's own field.  This is a 2 part question: 1) What is the formula to calculate Date #3 and 2) How do I input Date #3 into a separate field. Please give me detailed instructions. I'm a beg-int Access user.
Question by:Nubasian
    LVL 13

    Expert Comment

    Create a new query in access, select the table you want to use, select the fields you want to display.  

    In an empty column type this in:

    Date3: DateAdd("d", 60, [date2field])

    That takes care of your question 1 and 2 ;-)

    Author Comment

    Thank you lucas911. I asked the 2nd question incorrectly. I actually want the calculated Date3 inserted into a field that exists in the Income table.  
    LVL 13

    Accepted Solution

    Create a new date column in your table.  If you're updating existing records in your income table, then you would change your query to an update query.  The field name is the name of the field you just created and the update to part is:

    DateAdd("d", 60, [date2field])


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
    CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now