Hi does anyone know how to update a datepart?
or update the date
update table set datepart(dd, tablename) = '30'
What I want to do is udpate records date data but only the day
so where all of the records > '2009-07-25 00:00:00.000'
are updated to 30 i.e. 2009-07-30, I want to leave the timestamp portion alone in the records.
Thanks in advance.
Update table_name set field_name = DATEADD(d, 5, field_name) where field_name > '7/27/2009'
msdn link:
http://msdn.microsoft.com/en-us/library/ms186819(v=sql.90).aspx