Question: how to convert dd-mmm-yyyy to yyyy-mm-dd in javascript?
Answer: How to convert date format dd-mmm-yy to yyyy-mm-dd in javascript. var day = arr[0] ; if (day < 10) day = "0" + day; // add '0' if date is less then 10. return [year,month,day].