I am trying to display json data the html table. When i run my file, date appear as '2018-11-21T00:00:00.000+0000' in my table. But i need to display only '2018-11-21'. how i do it? can u help my to split it.
import { Certificate } from './certificate';
export const CERTIFICATES: Certificate[] = [
{ date: '2018-11-21T00:00:00.000+0000', ident: 'Fe', moy_certified: 0.297 },
{ date: '2018-11-22T00:00:00.000+0000', ident: 'Cu', moy_certified: 0.04 },
{ date: '2018-11-23T00:00:00.000+0000', ident: 'Mn', moy_certified: 0.0374 },
{ date: '2018-11-24T00:00:00.000+0000', ident: 'V', moy_certified: 0.019 },
{ date: '2018-11-25T00:00:00.000+0000', ident: 'Mn', moy_certified: 0.037 }
];
<ul class="cert-result">
<li *ngFor="let certificate of certificates">
<table>
<tr>
<th>Date</th>
<th>Element</th>
<th>Composition</th>
</tr>
<tr>
<td>{{certificate.date}}</td>
<td>{{certificate.ident}}</td>
<td>{{certificate.moy_certifiee}}</td>
</tr>
</table>
</li>
</ul>
{{certificate.date | date}}
usedate
filter