Need to add years to a date in an Access 2007 query

Posted on 2009-04-20
Last Modified: 2012-05-06
I am try to create a query the takes the date from 'Date Job completed' then adds 11 years and put a date in a field called 'Date for Destruction.' Does anyone know what I need to do to get this to work. I am guessing it is done in the field of a query.
Question by:thorpey83
    LVL 39

    Accepted Solution

    This should work.

    update [some table]
    set [date for destruction] = dateadd("yyyy", 11, [date job completed])
    LVL 46

    Expert Comment

    Select * ,Dateadd("yyyy", 11, [Date Job completed]) as  "Date for Destruction" From MyTable


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    MS Access question 11 39
    Day count current month 3 23
    Subform Link field 13 20
    Access 2013 combo box not working 3 11
    PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    733 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

    20 Experts available now in Live!

    Get 1:1 Help Now