JavaScript Formatting timestamp in Angular JS

Updated at : {{res.updated_at}}

Value: {"updated_at":"2017-04-12T21:46:20Z"}

I need to change this 2017-04-12T21:46:20Z to 2017-04-12 21:46:20 by removing T and Z. Please help how to achieve this. The code is in angular js.

Answer:1

Try to:

{{res.updated_at| date : 'yyyy-MM-dd HH:mm:ss'}}

Detail format at: https://docs.angularjs.org/api/ng/filter/date

Answer:2

"2017-04-12T21:46:20Z".split("T").join(" ").split("Z").join("")

Answer:3

here is my code: https://jsfiddle.net/hsf4yo5t/ HTML code: <input type="button" id="my-button" value="Show text input"> <input type="text" id="my-input"> CSS code: #my-input { ...

here is my code: https://jsfiddle.net/hsf4yo5t/ HTML code: <input type="button" id="my-button" value="Show text input"> <input type="text" id="my-input"> CSS code: #my-input { ...

I am implementing server-side rendering using redux-saga. I am following the "real world" example provided in the redux-saga repository. node.js entry-point uses react.js renderToString to render ...

I am implementing server-side rendering using redux-saga. I am following the "real world" example provided in the redux-saga repository. node.js entry-point uses react.js renderToString to render ...

I have a problem programming object-oriented in Javascript. I have the following: class Foo{ constructor(){...} ... a_needed_method(){...} ... a_method(){ ... ...

I have a problem programming object-oriented in Javascript. I have the following: class Foo{ constructor(){...} ... a_needed_method(){...} ... a_method(){ ... ...

  1. access parent this javascript
  2. access parent this
  3. react access parent this
  4. access the parent portal
  5. java access parent class this

I have an application where there could be anywhere between 1 - 30 POST ajax calls happening in parallel. Also these calls are being made to the same method in the controller. But when there are more ...

I have an application where there could be anywhere between 1 - 30 POST ajax calls happening in parallel. Also these calls are being made to the same method in the controller. But when there are more ...