I have an Angular 2 application. A service is requests data from an api that returns the results like the following:
{ \"data\":[ {\"id\":1,\"ti
Try out my example if its work for you. And here is the docs for Date and Pipe.
Date : {{announcement.createdAt | date:'EEE, d MMM,y'}} Time : {{announcement.createdAt | date:'shortTime'}}
Output :
Date : Tue, 20 Dec,2016 Time : 2:22 PM