How to update Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Table- TableInterviewStatus
with a field- SuggestedDate

For every record in the DB I need to change the SuggestedDate by adding say
7 days to the date.

How do I do this with a query?
 
Try
select SuggestedDate, DateAdd("d",7,SuggestedDate)
from TableInterviewStatus;

It will show you SuggestedDate and SuggestedDate + 7.

Hopefully, this will help you.
 
Nope didn't work. When you run it, it says to enter a value I need it to
automaticlly do it for every record.
 
That's funny. I have try the query that I wrote before I sent it out. It
gives me the result that I expected.
For example,

TableInterviewStatus:
SuggestedDate
==============
1/1/2004
11/5/2004

The query will produce
SuggestedDate Expr1
========== ===========
1/1/2004 1/8/2004
11/5/2004 11/12/2004
 
Ok got that to work so how to I get it to change the data in the table. It
just doesn't update the table now with the new date
 
First, I would made a backup of your table. Then I would try the query as
follow.
Sorry, I should just paste the update query the first time.

Update TableInterviewStatus
Set SuggestedDate = DateAdd("d",7,SuggestedDate);
 
Very good thanks for the help

JL said:
First, I would made a backup of your table. Then I would try the query as
follow.
Sorry, I should just paste the update query the first time.

Update TableInterviewStatus
Set SuggestedDate = DateAdd("d",7,SuggestedDate);
 
Back
Top