Format decimal hours as HH:MM

I have an object property with is decimal hours since midnight that I want to display as HH:MM of the day. eg. 22.33 → 22:20

Is this possible in the ontology and/or workshop?

I don’t believe this is supported out of the box but a few options come to mind:

  1. Store the value as a string (instead of double) with format HH:MM
  2. Write a FoO function that maps the double value to a formatted string
  3. Use a timestamp value in the ontology and then just pull the HH:MM via value formatting.
1 Like

Thanks for the tips. I don’t want to store them as a string because I want to be able to compute averages, etc. dynamically in Workshop and I didn’t want them to have a date, so they can’t really be a timestamp, but the FoO idea should work!