Question: how to convert date in yyyy-mm-dd format in jquery?
Answer: text(); // Above gives you date in String form. But for getting date, first create in date object like below var dt = new Date(yourdate); var newDt = dt. getFullYear()+""+(dt. getMonth()+1)+""+dt.