0

I've an input number that is the total minutes i.e. 59870

this is the value show in a format of hh:mm

{{ (msg.payload / 60|number:0)-1 }} : {{msg.payload % 60 | number:0 }}

thta will output

998:50

but actually it should be 997 hours.

How can I say to angular to round up or down?

these are the version info:

15 Jun 17:18:40 - [info] Node-RED version: v0.17.5
15 Jun 17:18:40 - [info] Node.js  version: v8.11.2
15 Jun 17:18:40 - [info] Linux 4.15.0-2-amd64 x64 LE
15 Jun 17:18:40 - [info] Loading palette nodes
15 Jun 17:18:41 - [info] Dashboard version 2.6.2 started at /ui
user2239318
  • 2,578
  • 7
  • 28
  • 50
  • 1
    Well, i tryed to replicate the situation in this pen https://codepen.io/FederalCircle/pen/eKGRZy but its working there. What is the angular version you are using? – Alyson Maia Jun 15 '18 at 14:29
  • Alyson, node-red still uses Angular 2 – SteveR Jun 15 '18 at 15:37
  • Personally, I would probably use the `moment` node to format the payload before sending it to `ui_template` – SteveR Jun 15 '18 at 15:39

0 Answers0