How do i pass/CRUD date format mm-dd-yyyy from DatePicker to MySql database and then read and update it

How do i pass/CRUD date format mm-dd-yyyy from DatePicker to MySql database format yyyy-mm-dd and then read and update it ?

@Gene You can moment function to format the date for eg: moment(DatePicker2.selectedDate).format("YYYY-MM-DD ")