title: Moment js split time string
body: <p>Am using moment <code>JS</code> to get the current time. Based on that time I need execute search operation in my elastic search database. </p>
  
  <p>My database entry is like this way : </p>
  
  <pre><code>"message_date": "2014-03-20T09:17:40.482Z"
  </code></pre>
  
  <p>Moment code to get current time is like this way : </p>
  
  <pre><code>var m = moment();
  var testResult = m.toJSON();
  
  // It outputs : 2014-03-20T09:17:40.482Z
  </code></pre>
  
  <p>My problem is I don't want to include that seconds filed in my database query. I want to search only up to minute field i.e <strong>2014-03-20T09:17</strong>. I can split the moment date to get the expected format. But i know its not the way to do that. Please help me to get the expected time format in moment <code>JS</code> way. Thanks </p>