May 16, 2005 #1 DJB2 IS-IT--Management May 16, 2005 1 NL I have an SQL database with a date time field but i want to only change the Month part. ie 10/12/2005 11:04:56 to 10/05/2005 11:04:56 can this be done using UPDATE? eg. Table name = tbl_StarterCallData Field Name = scd_Arrival Please help urgent. regards DJ
I have an SQL database with a date time field but i want to only change the Month part. ie 10/12/2005 11:04:56 to 10/05/2005 11:04:56 can this be done using UPDATE? eg. Table name = tbl_StarterCallData Field Name = scd_Arrival Please help urgent. regards DJ
May 16, 2005 1 #2 gradley Programmer Feb 24, 2004 335 US I'm assuming your date is in DD/MM/YYYY format? Code: UPDATE tbl_StarterCallData SET scd_Arrival = Dateadd(Month,-7,scd_Arrival) WHERE .... Make sure you include the where clause so that you don't modify all the records (unless you want to). Upvote 0 Downvote
I'm assuming your date is in DD/MM/YYYY format? Code: UPDATE tbl_StarterCallData SET scd_Arrival = Dateadd(Month,-7,scd_Arrival) WHERE .... Make sure you include the where clause so that you don't modify all the records (unless you want to).