Angular Date type
问题 From my angular interface date value coming like this. Sat Dec 29 2018 08:42:06 GMT+0400 (Gulf Standard Time) but after receiving data from api JSON result look like this. how to make it same type? 2018-12-27T13:37:00.83 Typescript export interface header{ vr_date : Date } Asp API class public class header { public Nullable<System.DateTime> vr_date { get; set; } } 回答1: You can use Angular's inbuilt DatePipe. So all you need to do is: In Component TS: import { DatePipe } from '@angular/common'