title: Javascript timestamp to date
body: <p>Can anybody help me with this, it's driving me crazy. I'm begginer with Javascript, and i encountered problem with dates for the first time now. </p>
  
  <p>I have already asked this, but no one answered me:
  <a href="https://stackoverflow.com/questions/23675061/json-with-parsed-time-or-timestamp-to-amcharts">json with parsed time or timestamp to amchartss</a></p>
  
  <p>Basically i have this XHR call.</p>
  
  <pre><code> getJSON = function(url) {
      var xhr = new XMLHttpRequest();
      xhr.open('get', url, true);
      xhr.responseType = 'json';
  
      xhr.onload = function() {
          var status = xhr.status;
          if (status == 200) {
              chartLoad(xhr.response);
              console.log(xhr.response);
          } else {
              console.log("oh shit");
          }
      };
      xhr.send();
  };
  </code></pre>
  
  <p>I'm getting in response here JSON file with timestamp, how can i convert all timestamps to date YYYY-MM-DD HH:mm.</p>
  
  <p>Before instead of timestamps i had date string converted directly on server, in that way i didn't need to do converting on client side, but this way work only on Chrome.</p>
  
  <p>HELP!</p>