how to format a date in moment to iso format date code example Example: how to get iso date with moment moment().toISOString(); // or format() - see below