Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-12-03 : 08:32:55
|
| Jodi writes "SQL 6.5 Windows XPI need to write a stored procedure that will allow me to accept a date time parameter / select a date time field and add a time interval (eg 1 hour) to it. Then insert / update the database with the new date time field. Thank you." |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2001-12-03 : 09:17:48
|
| Check Books Online for more details on the DateAdd() function, it works like this:UPDATE myTable SET dateCol=DateAdd(hh, 1, dateCol)This will add 1 hour to every value in the dateCol column. |
 |
|
|
|
|
|