Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2009-04-20
Medium Priority
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

BrandonGalderisi earned 2000 total points
ID: 24190475
This should work.

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

Expert Comment

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


Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

581 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