Posts

Showing posts with the label automapper

Angular5 + DotnetCore 2.1 - How to convert dateTime?

Image
Clash Royale CLAN TAG #URR8PPP Angular5 + DotnetCore 2.1 - How to convert dateTime? I have a problem handling date in angular, I got a datetime from server (using ASP.NET Core 2.1) like : "2018-07-29T06:31:41.57547" but actually I just need the date only without time like "2018-07-29". This caused my wont show the date in my form. Should I use AutoMapper to map all datetime to string first or could I just convert to date in my angular ? or any other solutions ? Did u try this from your api serverDate.ToString("yyyy-MM-dd"); – ershoaib 40 secs ago 1 Answer 1 Just convert it in Angular using DatePipe https://angular.io/api/common/DatePipe By clicking "Post Your Answer", y...