In my Java Script app I have the date stored in a format like so:
2011-09-24
Now when I try using the above value to create a new Date obje
Storing yyyy-mm-dd in MySql Date format you must do the following:
yyyy-mm-dd
const newDate = new Date( yourDate.getTime() + Math.abs(yourDate.getTimezoneOffset()*60000) ); console.log(newDate.toJSON().slice(0, 10)); // yyyy-mm-dd