jefferson1 Posted May 8, 2020 Report Posted May 8, 2020 oka table lo two columns unnai : CreationDate/Due Date Quote
jefferson1 Posted May 8, 2020 Author Report Posted May 8, 2020 Creation Date DueDate 2020-05-07 21:59:03.787 2020-05-08 21:59:03.787 2020-05-07 21:43:13.787 2020-05-08 21:43:13.787 2020-05-07 21:29:19.703 2021-05-08 21:29:19.703 how do i update the year in due date ( first two rows) there are several rows, which i want the year to be updated Quote
Sarvapindi Posted May 8, 2020 Report Posted May 8, 2020 You wont get right answer if u cant explain ur qn properly.. Quote
kevinUsa Posted May 8, 2020 Report Posted May 8, 2020 5 minutes ago, jefferson1 said: Creation Date DueDate 2020-05-07 21:59:03.787 2020-05-08 21:59:03.787 2020-05-07 21:43:13.787 2020-05-08 21:43:13.787 2020-05-07 21:29:19.703 2021-05-08 21:29:19.703 how do i update the year in due date ( first two rows) there are several rows, which i want the year to be updated Use the primary key and alter table change date Quote
jefferson1 Posted May 8, 2020 Author Report Posted May 8, 2020 1 minute ago, Sarvapindi said: You wont get right answer if u cant explain ur qn properly.. where did i go wrong? Quote
VinPetrol Posted May 8, 2020 Report Posted May 8, 2020 update TABLE_name set duedate = dateadd( year, 1, duedate ) where year (duedate) = 2020 Quote
jefferson1 Posted May 8, 2020 Author Report Posted May 8, 2020 Just now, kevinUsa said: Use the primary key and alter table change date got it bro, thank you Quote
Biskot2 Posted May 8, 2020 Report Posted May 8, 2020 9 minutes ago, jefferson1 said: Creation Date DueDate 2020-05-07 21:59:03.787 2020-05-08 21:59:03.787 2020-05-07 21:43:13.787 2020-05-08 21:43:13.787 2020-05-07 21:29:19.703 2021-05-08 21:29:19.703 how do i update the year in due date ( first two rows) there are several rows, which i want the year to be updated https://stackoverflow.com/questions/10388351/how-to-change-only-the-year-of-a-date-datatype Quote
Sarvapindi Posted May 8, 2020 Report Posted May 8, 2020 Just now, jefferson1 said: where did i go wrong? Nee scenario complete ga explain chey man..ila table undhi..first 2 rows update cheyyali ante ela?.... requirement proper ga cheppu...otherwise the solutions u get now will work but screwup later.. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.