title: Format moment to string
body: <p>I have a moment value passed to a function and I try to format the moment to a string in the format <em>YYYY-MM-DD HH:mm</em> (SS-ISO 8601). The date is accurately formatted but the time value is omitted.</p>
  
  <p>Code:</p>
  
  <pre><code>timeTransformer(value: moment.Moment) {
      return value == null ? null : value.format('YYYY-MM-DD HH:mm'); //Time is 00:00 even though I can see that moment has values 15:37:19
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/SX4LT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SX4LT.png" alt="Can somebody explain this to me?"></a></p>