Okay, because your elapsed time comes in a datetime format it is not straightforward.
If you didn’t expect uptime measured in years, you could cheat a bit by assuming calendar dates to be the same as elapsed time (so long as you don’t mind 0 being displayed)
[%1$tm month, %1$td days, %1$tH hours, %1$tm minutes]
As an aside, if you’re expecting uptime in years, why worry about the minutes?
If you want something neater, I think you’ll have to write a JS transform so that you can do the necessary like subtract 1972 from the year.
Thanks. This works in general fine.
I assume the leading zero and the words (singular / plural) could be handled better with a JS transform?
Do you have a proposal for JS transform as well?
Yes indeed, and you can make it show stuff like “50 days”, or drop minutes once you get to months elapsed, etc.
You might base something off of this
You’d need to express your datetime as an “epoch” time, which would give you elapsed time since 1972 as a number. Then you can divide as you wish for years, minutes, etc.
It would be a useful enhancement if the binding supplied the uptime as a Number:Time channel instead of dateTime. I expect that wasn’t available when it was written.