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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -