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;
<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
Post a Comment