I have two scenarios when I want to display duration in hours, minutes and seconds.
What would be best practices for displaying them in human readable format?
Displaying duration using datetime difference between two datetime values:
Thanks @Andreas_Becker!
This works well if data is saved to db with fields for hours, minutes & seconds.
Otherwise it would be tricky to show them in repeated elements.
Hey, as you can see in the first image, the input of the javascript is in my case fixed, but could also come from a database. The output might also be flexible. In my case i have an object with hours, minutes and secons but it could also be changed to have a concated string (so this does not need to be done in a second formula)
yeah I get it! Works well with values that have been locked in. Now it’s just a matter of solving first problem when other date is NOW(). I think the formula would work better with repeated items to.
Hey @Mevi. I try to figure out this out that it would work with repeated items. There isn’t way to run js for each repeated group item so this needs to be in formula?
@Mevi Just noticed an issue on iOS: when I leave the app and return, the application stops execution of all logic flows or NOW() inside a formula. Is there something I need to do the get the app running again?
Yeah iOS tends to stop logic when app is in background. Use page focused event to start the cycle again, or some other event that fires when app is opened again.