In SQL Server 2008 I need to update just the date part of a datetime field.
In my stored procedure I receive the new date in datetime format. From this parameter I h
One way would be to add the difference in days between the dates to the old date
UPDATE TABLE SET <datetime> = dateadd(dd,datediff(dd,<datetime>,@newDate),<datetime>) WHERE ...