I'm displaying date in my template:
<p>Datum</p>
<b>{{data.wageStatement?.date}}
This is how it's rendered:
2017-03-08T13:00:03.114Z
But I want to show only the date in this format:
2017-03-08
I'm displaying date in my template:
<p>Datum</p>
<b>{{data.wageStatement?.date}}
This is how it's rendered:
2017-03-08T13:00:03.114Z
But I want to show only the date in this format:
2017-03-08
Use
DatePipe
:You can find more info about
DatePipe
on Angular's official docs page.i use current time and date pipe in app:
-- and in template