get the date in yyyy-mm-dd format moment code example Example: moment now format var date = moment().format('MM/DD/YYYY');