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

Update Query (Date)

Status
Not open for further replies.

kermitforney

Technical User
Mar 15, 2005
374
US
How can I update a field to be one day before the date of another field?

|Start Date| End Date |
| 1/1/2007|[Start Date]-1 (Day)|
 
Have a look at the DATEADD function.

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
Simply this (SQL code] ?
UPDATE yourTable
SET [End Date]=[Start Date]-1

But I wonder why an EndDate should be prior a StarDate ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top