Ask Your Question
1

Calc: user defined number format for time duration showing hours and minutes [closed]

asked 2013-12-27 04:27:58 +0200

seanmadsen gravatar image

I have some cells in a LibreOffice Calc document the represent time duration (not time of day). I can set the format code to H:MM and it looks pretty good. For example four and a half hours can be entered by typing 4:30 or by typing 0.1875 (because it's 0.1875 days) and the cell will show 4:30. This is good.

But when I have a value over 24 hours, then the format does not produce a sensible display. For example, if I type 42:00 or type 1.75 I would like to see 42:00 but instead I see 18:00. This result makes sense to me, given the format code I'm using -- it's just showing the time of day on the next day.

I would like to find a number format code that will format 0.1875 as 4:30 and also format 1.75 as 42:00. Is this possible?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-11-16 18:24:07.454059

2 Answers

Sort by » oldest newest most voted
1

answered 2013-12-27 06:06:17 +0200

m.a.riosv gravatar image

"I would like to find a number format code that will format 0.1875 as 4:30 and also format 1.75 as 42:00. Is this possible?"

Yes it is: [H]:MM square brackets forces to show the total.

edit flag offensive delete link more

Comments

Yes! That works. Thank you!

seanmadsen gravatar imageseanmadsen ( 2013-12-28 02:34:12 +0200 )edit
1

answered 2013-12-27 04:38:40 +0200

seanmadsen gravatar image

This format code [>=1]0.## "days";H:MM "hrs" doesn't quite satisfy the requirement, but it might be a suitable work-around if no other answers appear. It gives:

  • 0.1875 → 4:30 hrs
  • 1.75 → 1.75 days
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-12-27 04:27:58 +0200

Seen: 6,568 times

Last updated: Dec 27 '13