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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date issues adding an extra day.

Status
Not open for further replies.

Neozero

MIS
Jul 7, 2000
49
0
0
US
I am trying to run an update statement that will add one day to a specific date field. Here is my update statement.


update employee
set empenddate = empbegindate +1
where empbegindate = empenddate

I don't know how to add an extra day to the empbegindate field. What I am trying to do is add an extra day to the empenddate because I have records that have the same dates in each field.


zero
 
set empenddate = DateAdd(Day,1,empbegindate)


Thanks

J. Kusch
 
FYI,
You can use the DATEADD function as Jay says, but actually your original query is perfectly valid. If you're adding days then you can use simple addition like that.

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top