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