Question: how to convert date into yyyy-mm-dd format in js?
Answer: To format a JavaScript date into “yyyy-mm-dd” format, use the toISOString() method. It converts using ISO standard i.e.