i got this json file
{
other arguments
"releaseYear": "9/11/2001",
other arguments
},
the releaseYear argument is formmated like that in the front-end 2001-09-10T21:00:00.000Z and i want it be like that 2001-09-10 and i got an input type date and got the same formmat as the first one and want it be like YYYY-MM-DD
trying to fix this date formmat
the thing you're trying to do here can easily be solved via packages like dayJS or momentJS.
npm install moment --save
or yarn add moment
(based on your project npm/yarn)moment(releaseYear).format('YYYY MM DD');
For extensive formatting guide, read here: https://momentjs.com/docs/#/parsing/string-format/