Thread: Time Problem
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Thurlow Thurlow is offline
external usenet poster
 
Posts: 6
Default Time Problem

Mad props. Exactly what I was looking for. Thanks.

BTW, the decimal days is simply a result I recieve from another calculation
in a report imported to Excel from altogether different piece of software.
Can't make the conversion at the source, so I have to work with it on my end.


Thanks again.

"Peo Sjoblom" wrote:

This begs the question why you are using decimal days?

With the value in A1

days

=INT(A1)

hours

=INT(24*MOD(A1,1))

minutes

=MINUTE(MOD(24*MOD(A1,1),1)/24)

seconds


=SECOND(MOD(24*MOD(A1,1),1)/24)

note that it is important that you format the cells with the these formulas
as General, especially the ones that are using MINUTE and SECOND since they
will return time format otherwise



--
Regards,

Peo Sjoblom




"Thurlow" wrote in message
...
Having trouble converting decimal days to days, hours, minutes, & seconds.
For example, I would like to see:

16.4543 Days

become

16 Days
10 hours
54 minutes
12 seconds

Have tried using the RIGHT and CONVERT functions, but the RIGHT logic
fails
if I have a whole number for days to start with (no places right of the
decimal).

Any thoughts?