DateTime.valueOf() returning next year date for December month dates
In valueOf(), the specified string should use the standard date format “yyyy-MM-dd HH:mm:ss”. Formatting using YYYY(Uppercase) is NOT the same as yyyy(Lowercase). So, change YYYY(Uppercase) to yyyy(Lowercase) to fix this ....