format Data react code example
Example 1: react date format
npm install moment --save
Example 2: how to trim dates in react
render: function() {
var cts = this.props.message.createdAt,
cdate = (new Date(cts)).toString();
return (
...
<span ...>{ cdate }</span>
...
);
}