0

I have a question. I got a response from server as below:

CreatedDate: "2020-06-25T00:00:00.000Z"

When I display data in an HTML table (by this code)

<td> {{slot.CreatedDate | date:"dd-MM-yyyy HH:mm"}} </td>

the date will be shown as the following:

"25-06-2020 05:30"

But I need output like this:

"25-06-2020 00:00"

which I have received from the server the same time. Please suggest to me.

Thanks in advance.

xKobalt
  • 1,498
  • 2
  • 13
  • 19
Siva
  • 9
  • 1
  • 5
  • 1
    Check this link, https://stackoverflow.com/questions/56374779/angular-display-gmt-date-time-using-pipe . See if it helps. – BEAGLE Jul 13 '20 at 05:52

1 Answers1

1

change your dateformat as below.

{{ slot.CreatedDate | date : 'dd-MM-yyyy HH:mm':'GMT+05:30':'en-US'}} 
surendra kumar
  • 1,686
  • 11
  • 15