Convert data to yyyy mm dd format | JavaScript

April 25th, 2021 10:38:41 PM

					
// `date` is a `Date` object const formatYmd = date => date.toISOString().slice(0, 10); // Example formatYmd(new Date()); // 2020-05-06

Featured Posts