Categories blog code Changing only the year in a mysql date or datetime field Ever had to change only the year of an date-field? Continue reading to learn how! Post author By Daniel Kurdoghlian Post date July 2, 2016 No Comments on Changing only the year in a mysql date or datetime field For a datetime-field: UPDATE table_name SET date_column=DATE_FORMAT(date_column,'2016-%m-%d %T'); For a date-field: UPDATE table_name SET date_column=DATE_FORMAT(date_column,'2016-%m-%d'); Tags MySQL ← It’s been a little silent here, lately Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment Name * Email * Website