Moment JS

Example of parsing and formatting a Date with Moment JS.

by pawan1_saket

HTML

<script src="http://momentjs.com/downloads/moment.js"></script>

JavaScript

var data = { 'Informatica DQ': 
   [ { id: 'SJxbCSKVV7',
       user: [Object],
       teams: [Array],
       event: [Object],
       wScore: 225,
       timestamp: '2018-03-14T23:23:34.445Z',
       description: 'Add User for DM Actions on Informatica DQ',
       url: '',
       rawData: {} },
     { id: 'BykgbCHY4V7',
       user: [Object],
       teams: [Array],
       event: [Object],
       wScore: 63,
       timestamp: '2018-03-06T18:42:26.254Z',
       description: 'Create New Asset for DM Actions on Informatica DQ',
       url: '',
       rawData: {} },
     { id: 'BJ4MArYEEQ',
       user: [Object],
       teams: [Array],
       event: [Object],
       wScore: 171,
       timestamp: '2018-03-24T20:33:53.901Z',
       description: 'Add for DM Actions on Informatica DQ',
       url: '',
       rawData: {} },
     { id: 'BkzgfAHYVVQ',
       user: [Object],
       teams: [Array],
       event: [Object],
       wScore: 63,
       timestamp: '2018-03-22T18:59:52.938Z',
       description: 'Create New Asset for DM Actions on Informatica DQ',
       url: '',
       rawData: {} },
     { id: 'rkXeGRrYN4Q',
       user: [Object],
       teams: [Array],
       event: [Object],
       wScore: 117,
       timestamp: '2018-03-25T01:08:58.084Z',
       description: 'Reject for DM Actions on Informatica DQ',
       url: '',
       rawData: {} },
     { id: 'SJZlm0HKVN7',
       user: [Object],
       teams: [Array],
       event: [Object],
       wScore: 117,
       timestamp: '2018-03-17T03:06:01.374Z',
       description: 'Reject for DM Actions on Informatica DQ',
       url: '',
       rawData: {} },
     { id: 'SkH4CBF4Nm',
       user: [Object],
       teams: [Array],
       event: [Object],
       wScore: 63,
       timestamp: '2018-03-15T13:21:32.945Z',
       description: 'Create New Asset for DM Actions on Informatica DQ',
       url: '',
       rawData: {} },
     { id: 'HktgE0BKV47',
       user: [Object],
       teams: [Array],
       event: [Object],
     ...