angular - Angular2 DateTime parse error -


i want create fields such create date, update date, etc.

but when these dates shown, minute 0-9, shows hh:2:ss should logically hh:02:ss.

inside file came me network tab;

network tab - incoming data want

this frontend display format;

frontend layout

<div style="display:flex;">    <span class="editlabel form-control">{{ 'created_at' }} :</span>    <div class="form-addcontrol form-control"> {{data.created_at | date:"dd.mm.yyyy hh:mm:ss"}}</div> </div> 

i did research, nobody mentioned it. glad if me. in advance..

you need convert "data.created_at" date format , can use datepipe

1.replace symbol split time , date ("t").

2.parse numbers in array.

3.create date new date(year,mouth,day,hours,mins,seconds).

4.use datepipe.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -