I am trying to display only the time from a date. My code looks like this:
$scope.sample_time = "September 14th 2017, 1:00:00 pm";
What I want in my view is to show just the time, for example 1:00 pm
.
I attempted to use angular-moment
, with something like
{{ sample_time | amParse:'HH:mm a'}}
but the output is 2017-09-14T06:00:00.000Z
.
Is there something that I am missing here? Any assistance would be greatly appreciated.