0

These are minutes : 1956

I want to format these minutes to : HH:mm

I'm using angular2-moment.

I've tried : 1956 | amDuration:'minutes' | amDateFormat: 'HH:mm'

But I get "Invalid date"

What do i have to do to make it work ?

Swarovski
  • 581
  • 2
  • 8
  • 25

2 Answers2

1
moment.duration(1956, "minutes").format("h [hrs], m [min]");
// "32 hrs, 36 min"
Paul Rooney
  • 20,879
  • 9
  • 40
  • 61
Rahul Cv
  • 725
  • 5
  • 12
0
countdown = 600;

{{ (countdown | amFromUnix) | amDateFormat: 'mm:ss' }}

//Output 10:00
Rafael L R
  • 521
  • 1
  • 4
  • 8