PPRuNe Forums

PPRuNe Forums (https://www.pprune.org/)
-   Computer/Internet Issues & Troubleshooting (https://www.pprune.org/computer-internet-issues-troubleshooting-46/)
-   -   Adding 10 weeks to a date in MS Access 2000 (https://www.pprune.org/computer-internet-issues-troubleshooting/33340-adding-10-weeks-date-ms-access-2000-a.html)

mfuller_uk 11th February 2002 03:14

Adding 10 weeks to a date in MS Access 2000
 
Does anyone know how you can add a number pd days/weeks/months/years etc to a date in Access. i.e. how do you make a query to add two weeks to an already inputtued date in a table.

Any help much appreciated

Michael Fuller PAFP. [email protected]

Agent86 11th February 2002 04:17

Michael,

The function you use is DateAdd. Check the help re this but basically.

Dateadd("X",Y,Z)

X is the interval => s-seconds n-minutes (!!!). .d-days,w- weekdays (!!!),ww-weeks, m-months,y-year

Y is the number of intervals (can be negative). .Z is the date you want to change.

If you just want a query to output this, just type in the the Field Dateadd("x",Y,Z) and make Z the field you want to add the interval to ..ENCLOSED in square brackets[field1].

If you want update the data use an update query

Be very careful!!. .Enter the formula as above in the "update to" field of the field you want to change.

Make sure that your Criteria is correct before running the Query.

MAx

mfuller_uk 11th February 2002 16:20

Thanks alot i will give that a try. I was sure that there must have been a function in access to do what i wanted, it is just a matter of knowing what it is.

Michael

Agent86 12th February 2002 18:27

Mike,

yes, the learning curve in Access is a bit like a brick wall. I found that thinking of what I wanted and then some working thru the help system worked most times.

MAx


All times are GMT. The time now is 10:57.


Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.