convert mm dd yy to date code example
Example 1: javascript convert date from mm/dd/yyyy to yyyymmdd
var yourdate = date.split("/").reverse().join("-");
Example 2: Convert a date to yyyy mm dd format
const formatYmd = date => date.toISOString().slice(0, 10);
formatYmd(new Date());