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

Need to update Dates via Query

Status
Not open for further replies.

jharber15

Technical User
Mar 7, 2007
1
US
I am currently working on a demo server for my company and need to find a way to always make the data look "real". The easiest way that I have found to do this would be to update the date values +1 day everyday after midnight when no one would be using the system.

It would be ideal for me to be able to roll this +1 day to move to the next month (ie 12/31 moves to 1/1). I could easily just do the same plus 1 function on the month during that date change period.

I have been working with the DateAdd function, but not having much luck. Does anyone have any suggestions on how to gradually move a date value like this?
 
What database are you using, and what have you tried so far?

GOod Luck,

Alex

Ignorance of certain subjects is a great part of wisdom
 
The ANSI SQL syntax:
UPDATE yourTable
SET yourDate = yourDate + 1 DAY

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