# How to best display number of hours

What would be a better solution when displaying the number of hours required for some task? For example: 1 hours and 30 minutes, in a short way.

• `1,5h` - as 1 and half hour
• `1,3h` - as 1 hour and 30 minutes

Why I listed those two is because I'd prefer to keep it compact and not take too much space.

• Definitely not `1,3h`. I almost suffered an aneurysm trying to make heads or tails of that because decimals do not reset at `1,59` Nov 13, 2018 at 17:59
• I have never seen 1,3h used for 1:30, its would be confusing as hell. 1,5h is 1:30, or just stick to 1:30 notation, or add suffixes e.g. 1h 30m. Nov 13, 2018 at 18:01
• In which locale does "1,3h" mean 1 hour and 30 minutes? Nov 13, 2018 at 18:25
• Decimal times like 1,3h (1h18m) are used in German Industrieminuten ("industrial minutes"), mostly for time keeping. It was supposedly easier to handle in early timekeeping system (before computers were used) but I don't see any advantage today. It is confusing to calculate. You have to multiply the decimals by a factor of 6 to get real minutes. Also the notation is also not always that compact. 1h15 is 1,25 - so you don't save much space. Nov 13, 2018 at 21:21
• Note that, in English, the decimal separator is the period, not the comma. Nov 13, 2018 at 22:07

Jira has a great and clear way of doing this when entering time estimates in the task estimate field, simply using 1 letter after the weeks (w), days (d), hours (h) and minutes (m).

By not allowing a user to enter decimals, visualizing and reading the data is much easier.

For example, if a user adds 1,50h would they mean 1 hour and 50 minutes or 1 hour and 30 minutes? Jira solves this cleverly by chopping it up in the various units directly.

Examples of what can be entered:

• 1w 4d 1h 30m
• 4d 1h 30m
• 1h 30m
• 1h
• 30m

You can specify a time unit after a time value 'X', such as Xw, Xd, Xh or Xm, to represent weeks (w), days (d), hours (h) and minutes (m), respectively.

From Jiras logging work and time tracking guides

This may differ with each organisation depending on how they set it but its a good, clear example of this.

• I believe if you do enter `1.5h` (or with a comma, depending on locale) it does treat that as one-and-a-half hours, but (IIRC) converts it immediately to `1h 30m` to remove any ambiguity (might vary by version, but I seem to remember being able to do this). Nov 13, 2018 at 15:07
• Beware that such time units don't translate well, especially to non-latin-based languages. Nov 14, 2018 at 9:36
• trivial fact: if you input 8h in jira, that's converted to 1d :) Nov 15, 2018 at 14:17
• @STTLCU It is :) thats the factory setting, it is configurable to suit different organisations. :)
– UIO
Nov 15, 2018 at 14:19
• @OwenHughes yes I would expect that to be doable :) on a more practical side, entering 200m would return 3h 20m Nov 15, 2018 at 14:21

Standard format for time (and time intervals less than 24 hours in duration) is set by ISO 8601.
Using extended format (hh:mm[:ss]) fits best (note `:`!), clearly conveying time nature of the value.

From my experience, even though it says:

Decimal fractions may be added to any of the three time elements. However, a fraction may only be added to the lowest order time element in the representation..

using a fraction may lead to ambiguous interpretation.

`HH:mm` gives you shortest (only 5 charachters in width) and cleanest widely recognizable format.

• With respect to the last paragraph, this is also the shortest unambiguous way if you want to handle all common intervals less than 24h. `10.25` is the same number of characters as `10:15`, but `10.25` could also be read as `10:25`. Unicode supports fractions equivalent to 30, 20, 15, 12, 10 and 6 minute intervals, but "1⅖ hours" isn't all that helpful, and you can't do 5 minutes, only 6: "⅒ hour", so this approach isn't much use Nov 14, 2018 at 9:56
• It's not cleanest and it's not unambiguous because HH:mm is often indistinguishable from mm:ss. That's why we prefer letter suffixes when i18n isn't a concern. When it is, you'll want some different scheme entirely. Nov 14, 2018 at 11:18
• @LightnessRacesinOrbit, yes but OP did not mention seconds. If they are needed `HH:mm:ss` should be used, as i said in my 1st paragraph. Also, users should be aware of the context (as much as the UI :)). Nov 14, 2018 at 16:58
• @Astrogator Sorry I think you missed my point, which is that the `HH:mm` syntax does not provide that context and is thus ambiguous. Nov 14, 2018 at 17:11
• And i believe you missed mine: this context is external to format. Nov 14, 2018 at 17:14

I don't have enough reputation to comment so this answer is intended to add additional context to Astrogator's (Though I do think that Owen Hughes has provided the best answer from a UI perspective).

Astrogator's answer is misleading in that it conflates "time" (the absolute value of the time of day in a given time zone) with "duration" (the amount of time that something may take to complete)

ISO 8601 defines the following standard format for a time duration:

PnYnMnDTnHnMnS

where:

• P denotes that this is a duration (period) of time
• n is the amount of that size interval that is included
• Y/M/D designate Years, Months and Days respectively (also W for Week)
• T separates the day and larger units from sub-day units (time)
• H/M/S designate Hours, Minutes and Seconds respectively
• Any unit with a zero value can be excluded (eg. P1D can be read as P0Y0M1DT0H0M0S) so long as at least one is included (eg. P is not valid for a zero-length period but P0S is)

In addition T must be included if the days and lager are zero in order to avoid ambiguity, this means that P1M describes 1 Month while PT1M describes 1 minute. Decimals are also accepted as P1.5H = P1H30M. It is valid as well to include a value greater than the size of the next unit, with the caution that P1DT1H and P25H may not be the same where the interval falls over a change in daylight-savings time - a duration of P1D takes you to the same time the following day but a duration of P24D would have an extra hour consumed or an hour skipped leaving you an hour different.

The end result of all this is that the ISO standard description of a 1 hour 30 minute duration would be P1H30M. However, whilst this format is great if you are familiar with the standard, it is obtuse to unfamiliar users and I believe as a result that the Jira approach recommended by Owen Hughes is the best approach for your use-case.

• I disagree with "conflating time and duration"; i clearly said and time intervals less than 24 hours in duration. Most users will be lost in all the prefixes and suffixes of the scientific Duration format (have you ever seen a countdown timer in this format?). My answer is still shortest (- what's been asked for!), while being explicit enough (with possible addition of `:ss` based on context) :)) Nov 14, 2018 at 17:11
• This format uses uppercase letters to separate digits and includes no whitespace, which makes it harder for humans to read than any of the alternatives suggested in other answers. ISO date formats seem to have been optimized for machine readability and possibly also environments that don't support lower case.
– zwol
Nov 15, 2018 at 13:35
• @Astrogator That's well and good but it is not the correct representation for time intervals (duration) of any length, whether less that 24 hours or otherwise which is why I felt it was necessary to provide the actual ISO standard in this response. Nov 26, 2018 at 13:25
• @zwol Agreed, I tried to get that across in pointing out that I highly recommend Owen Hughes' answer for applications where this format is actually intended for users. If you think the additional reasoning is of benefit then feel free to edit it in. Nov 26, 2018 at 13:28

In addition to displaying individual values like `4d 1h 30m` as shown in the accepted answer, it needs to be said that in context of reports (or other lists with multiple values) it would be unacceptable:

``````Name           Hours
-----------------------------
Peter          4d 1h 30m
Joan           1d 30m
Thomas         2w
-----------------------------
Total          2w 5d 2h
``````

``````Name           Hours
-----------------------------
Peter           97.50
Joan            24.50
Thomas         336.00
-----------------------------
Total          458.00
``````

Another note:

When going with accepted answer, in cases like
`2w 1h`
you might prefer
`2w 0d 1h`
what assures the user about number of days. You know, `2d 10s` may look a bit weird. Let's pick hours and minutes as a base unit which is always present (at least one of them) and whatever goes to the left or to right, list all related units, even if zero.

1:30 hrs

I most commonly see time with colon characters, for example: "1:30 hrs" to mean 1 hour and 30 minutes. I think this is even the format that my car sat nav displays.

• Or is that 1 undefined and 30 hours? Or a ratio? Or a time on the clock? I don't recall ever in my life having seen `1:30 hrs` being used to refer to a duration prior to this answer. Nov 14, 2018 at 17:35
• @doppelgreener I do remember seing durations expressed in this format here and there, so it is used in some places. It doesn't make it right though ... It gives me headache everytime I see it as I have to think hard about the interpretation of each digit, which end up in using the context to find the most plausible match ... in the end I only end up with an educated guess!
– Hoki
Nov 14, 2018 at 18:47
• For referencing timestamps in video, such as on YouTube, it's commonplace to say something is "@3:24" for 3 minutes 24 seconds. Since time is normally expressed with colons, like "6:19" is the current time where I am, as in 6 hours and 19 minutes, it is pretty natural to use that as a measure of duration as well. Nov 15, 2018 at 23:20