Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date a year from now after date is updated in another field 1

Status
Not open for further replies.

JSD

Technical User
Jan 18, 2002
189
0
0
US
Hello

I'm trying to add a date column to a table that calculates a new date one year from an updated field in another date column...in need of some of your knowledge.

Many thanks

Jeremy
 
Use the DateAdd Function. Something like this...

NewDateField = DateAdd("y", 1, OldDateField)

Good Luck,
Poop
 
Hello

Thanks poopcheese, that worked perfectly. That one is going into the permanent memory banks...

Jeremy
 
Hello

Me again. Is there a way to make the same date calculation in tables as well? Let me know if you see this...

Thanks

Jeremy
 
Unless you are using SQL server, you'll need to run an update query to update the NextYear field after each new date record is added.

If using SQL server, you can set a trigger on the table to do the same thing.

-Poop
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top