moment js make date from string code example Example 1: moment to date moment().toDate(); Example 2: moment js print date moment(testDate).format('MM/DD/YYYY');