Created attachment 196533 [details] Number format dialog with existing categories - no Duration Among our number format categories, we have "Time" and "Date"; but - what about durations? There are multiple ways to format durations, and basically none of them is offered. I'm not even sure if they're actually supported and the UI is missing, or whether they also need to be implemented. Without any formatting (i.e. general) - a difference between date fields, for example, seem to result in a fractional number of days. Not too bad, but not what the user often wants. See also bug 67763 which mentions support for Durations internally.
https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html#:~:text=Of%20China%20Calendar-,Time%20Formats,Format%20Code,-Hours%20as%200
(In reply to m_a_riosv from comment #1) > https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html#:~: > text=Of%20China%20Calendar-,Time%20Formats,Format%20Code,-Hours%20as%200 I skimmed the page... nothing seems to mention durations or elements-of-duration. So, were you telling me that there's no support for this number format as of yet?
Time Formats To display hours, minutes and seconds use the following number format codes: Format Format Code Hours as 0-23 H Hours as 00-23 HH Hours as 00 up to more than 23 [HH] <----------- Minutes as 0-59 M Minutes as 00-59 MM Minutes as 00 up to more than 59 [MM] <----------- Seconds as 0-59 S Seconds as 00-59 SS Seconds as 00 up to more than 59 [SS] <----------- https://ask.libreoffice.org/t/time-as-duration/29472
(In reply to m_a_riosv from comment #3) > Time Formats > To display hours, minutes and seconds use the following number format codes: > Format Format Code > Hours as 0-23 H > Hours as 00-23 HH > Hours as 00 up to more than 23 [HH] <----------- > Minutes as 0-59 M > Minutes as 00-59 MM > Minutes as 00 up to more than 59 [MM] <----------- > Seconds as 0-59 S > Seconds as 00-59 SS > Seconds as 00 up to more than 59 [SS] <----------- > > https://ask.libreoffice.org/t/time-as-duration/29472 Indeed, those _could_ be elements-of-duration. But how they interact is not explained; nor do we have days, months and years. So, this is not sufficient to render durations.
Days are directly the value without decimals, so nothing is needed. https://help.libreoffice.org/latest/en-US/text/scalc/01/04060102.html And also, there are functions to calculate: DATEDIF https://help.libreoffice.org/latest/en-US/text/scalc/01/func_datedif.html?&DbPAR=SHARED&System=WIN YEARS YEARFRAC MONTHS DAYS If you want to deepen your knowledge of LibreOffice, please start by reading the manuals.
Miguel's comments do not result in the conclusion that a duration category is not necessary. Indeed, we have [HH], [MM] and [SS] components - and these can build various duration formats. But - that still needs to go in its own category. There is currently one duration format available in the Time category - and it is misplaced. We need at least: [SS] [MM]:SS [HH]:MM:SS [HH]:MM:SS.00 which we can already have. And it would be nice to have fractional support for hours and minutes, so that we can also have: [HH]:MM.00 [MM].00 [HH]00 which don't exist. Regardless, the Duration category is appropriate to have, and there is no need to send users to the manual.