How can I format the ISO date into correct format? The date format return from the server side is like: 2016-12-28T11:44:00Z.
Here is my html:
<tr *ngFor="#ticket of tickets">
   <td>{{ticket.id}}</td>
    <td>{{ticket.subject}}</td>
    <td>{{ticket.status}}</td>
    <td>{{ticket.created_at}}</td>
    <td>{{ticket.updated_at}}</td>
    <td><a [routerLink]="['SingleTicket', {'id': ticket.id}]" class="btn btn-outline-primary">View</a></td>
</tr>
And here is the ticket interface.
export interface Ticket {
    id: number,
    subject: string,
    description: string,
    status: string,
    submitter: number,
    created_at: Date,
    updated_at: Date
}
                Have you tried with PIPE? .. (old Angular 1 filter) .. something like:
<td>{{ticket.created_at | date: 'dd/MM/yyyy' }}</td>
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With