View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Format duration in mm/dd hh:mm

a duration that could last several month.
d hh:mm


That format will only work up to 31 days, after that it rolls over.

I don't know of a number format that will handle this application. AFAIK,
you'd need to do something like:

=INT(A2-A1)&" "&TEXT(MOD(A2-A1,1),"h:mm")

Which is a text string.

--
Biff
Microsoft Excel MVP


"Shane Devenshire" wrote in
message ...
Hi,

try

d hh:mm

or some other variation which meets your needs
Choose Format, Cells, Number tab, Custom, and enter the above code on the
Type line.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Malkowiak.work" wrote:

Hi,
I need to display a duration that could last several month.
I make a difference between 2 dates and I apply the format mm/dd/ hh:mm.

It works fine except that it displays always 01 for the month.
For axample
18/06/2009 23:03
22/06/2009 07:21
result = 01/03 08:17
where it should be 00/03 08:17

In fact Excel treat this duration as a serial date. In that case the
minimun
value for the month is 1 for January.
Then the same problem is propagated in the chart that I make based on
that
column value.

Any help is welcome
Eric