title: Convert String to Date in React
body: <p>I retrieve a date variable from a JSON object in a string format, but I am having trouble getting the elapsed time until now.</p>
  
  <pre><code>import React from 'react';
  
  export default class Date extends React.Component {
  render() {
  
      console.log(this.props.date); //shows: 2017-01-25T10:18:18Z
  
      var date = Date.parse(this.props.date.toString());
  
      console.log(date.getTime());
  
      return (
          &lt;div &gt;
        &lt;/div&gt;
      );
     }
  }
  </code></pre>