Format(Now, "YYYY-MM-DD") code example
Example 1: js date format yyyy-mm-dd
yourDate.toISOString().split('T')[0]
Example 2: Convert a date to yyyy mm dd format
const formatYmd = date => date.toISOString().slice(0, 10);
formatYmd(new Date());
yourDate.toISOString().split('T')[0]
const formatYmd = date => date.toISOString().slice(0, 10);
formatYmd(new Date());