0

I have below code for displaying date and time.

<span>{{event.date | amDateFormat:'DD.MM.YYYY HH:MM' }} Uhr</span>
<span>{{event.modificationDate | amDateFormat:'DD.MM.YYYY HH:MM' }} Uhr</span>

and values for each is as below:

$scope.event = {
    'date': '2016-11-15T11:13:32+0000',
    'modificationDate': '2016-11-15T11:23:24+0000'
}

But its displaying same for both (please refer the screenshot below).

enter image description here

For 'modificationDate' its displaying wrong time. how to resolve this? plunker here

Pradeepb
  • 2,564
  • 3
  • 25
  • 46

1 Answers1

1

You have formatted your time as HH:MM, where the capital M are the months. Instead do it like HH:mm:

<span>{{event.date | amDateFormat:'DD.MM.YYYY HH:mm' }} Uhr</span>
<span>{{event.modificationDate | amDateFormat:'DD.MM.YYYY HH:mm' }} Uhr</span>
devqon
  • 13,818
  • 2
  • 30
  • 45