DateAdd Function Help

SantasLittleHelper

Board Regular
Joined
Nov 25, 2016
Messages
77
Does anybody know the best way to automatically add a date that is 6 months in the future?

e.g. I have a table with a 'Start Date' which is 01/04/16. How can I make the field 'End Date' in the same table automatically update 6 months in advance (01/10/16)?

I have seen a few things online about Update Queries but I am not sure how to do these.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,367
Office Version
  1. 365
Platform
  1. Windows
You could use DateAdd in an UPDATE query to do this but you really shouldn't do this in a table.

Let's say you did and new data was added, that would mean you would have to redo the UPDATE query.

Also if, and I know it's probably unlikely, the Start Date was to change in a record you would need to do the calculation again.

Calculations like this really belong in queries.

PS The expression would be EndDate:DateAdd("m", 6, [Start Date]).
 
Upvote 0

JeanKim

Board Regular
Joined
May 31, 2016
Messages
183
:( I didn't read this carefully. I thought it was for excel.
Give me a minute for me to test in access
 
Upvote 0

Forum statistics

Threads
1,195,598
Messages
6,010,644
Members
441,558
Latest member
lambierules

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top