Could anyone advice me on how I could run an UPDATE statement in SQL Server to take a number of given DATETIME fields and deduct two months from them?
+5
A:
UPDATE YourTable
SET DateField1 = DATEADD(mm, -2, DateField1)
WHERE .....
AdaTheDev
2010-09-08 10:30:09
+2
A:
use DATEADD with first argument as 'm' or 'mm' and second as '-2' and third one being your date
Sachin Shanbhag
2010-09-08 10:31:26