Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Calculating days and hours

How can I convert decimal days, eg 12.375 days, to days and whole hours? Ex.
12 days 3 hrs.?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Calculating days and hours

Hmmm.. 12.375 days would translate to 12 days 9 hours, wouldn't it?

IF (a) all your time spans are less than 32 days, and (b) you're using
the 1900 date system, you could just choose Format/Cells/Number/Custom:

d "days" h "hrs."

(which will round to the nearest hour).

Otherwise you could use

A1: 12.375
B1: =INT(A1) & TEXT(A1," \da\y\s h \hr\s.")


In article ,
Woodturner wrote:

How can I convert decimal days, eg 12.375 days, to days and whole hours? Ex.
12 days 3 hrs.?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Calculating days and hours

Thanks for the reply. I was thinking in terms of 8 hr. work days where .375
days would be 3 hours. (Didn't everyone think that?) I'm not a programmer, so
here is an example that may explain what I want to do better than me.

Ex. - 41 vacation hrs. equates to 5.125 weeks, or 5 weeks and one day. I
need to divide the original number of hrs. by 8 to get whole weeks, and then
multiply the decimal remainder by 8 to get the number of additional hours.

Can I use the MOD function some way to calculate the number of hours after
taking off the number of days? Maybe (n1 MOD n2)*8, where n1 is the
begininning number of vacation hours, and n2 is 8.

Have I been wordy enough?

Thanks again.

"JE McGimpsey" wrote:

Hmmm.. 12.375 days would translate to 12 days 9 hours, wouldn't it?

IF (a) all your time spans are less than 32 days, and (b) you're using
the 1900 date system, you could just choose Format/Cells/Number/Custom:

d "days" h "hrs."

(which will round to the nearest hour).

Otherwise you could use

A1: 12.375
B1: =INT(A1) & TEXT(A1," \da\y\s h \hr\s.")


In article ,
Woodturner wrote:

How can I convert decimal days, eg 12.375 days, to days and whole hours? Ex.
12 days 3 hrs.?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Calculating days and hours

Well, after reading a bit closer about MOD, which I should have done to start
with, I see that it will not do what I want to do. Any more suggestions?
Thanks...


"JE McGimpsey" wrote:

Hmmm.. 12.375 days would translate to 12 days 9 hours, wouldn't it?

IF (a) all your time spans are less than 32 days, and (b) you're using
the 1900 date system, you could just choose Format/Cells/Number/Custom:

d "days" h "hrs."

(which will round to the nearest hour).

Otherwise you could use

A1: 12.375
B1: =INT(A1) & TEXT(A1," \da\y\s h \hr\s.")


In article ,
Woodturner wrote:

How can I convert decimal days, eg 12.375 days, to days and whole hours? Ex.
12 days 3 hrs.?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Calculating days and hours

After reading even closer I see that the INT function will do what I want.

Thanks...

"Woodturner" wrote:

Well, after reading a bit closer about MOD, which I should have done to start
with, I see that it will not do what I want to do. Any more suggestions?
Thanks...


"JE McGimpsey" wrote:

Hmmm.. 12.375 days would translate to 12 days 9 hours, wouldn't it?

IF (a) all your time spans are less than 32 days, and (b) you're using
the 1900 date system, you could just choose Format/Cells/Number/Custom:

d "days" h "hrs."

(which will round to the nearest hour).

Otherwise you could use

A1: 12.375
B1: =INT(A1) & TEXT(A1," \da\y\s h \hr\s.")


In article ,
Woodturner wrote:

How can I convert decimal days, eg 12.375 days, to days and whole hours? Ex.
12 days 3 hrs.?




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Calculating days and hours

=INT(A1) & " days " & 8*MOD(A1,1) & " hours" sounds like the answer to your
original question, but in your message below you have confused me when in
one breath you are referring to weeks and days (in some system where there
are apparently 8 days in a week!) and in another breath you are referring to
days and hours.
--
David Biddulph

"Woodturner" wrote in message
...
Thanks for the reply. I was thinking in terms of 8 hr. work days where
.375
days would be 3 hours. (Didn't everyone think that?) I'm not a programmer,
so
here is an example that may explain what I want to do better than me.

Ex. - 41 vacation hrs. equates to 5.125 weeks, or 5 weeks and one day. I
need to divide the original number of hrs. by 8 to get whole weeks, and
then
multiply the decimal remainder by 8 to get the number of additional hours.

Can I use the MOD function some way to calculate the number of hours after
taking off the number of days? Maybe (n1 MOD n2)*8, where n1 is the
begininning number of vacation hours, and n2 is 8.

Have I been wordy enough?

Thanks again.

"JE McGimpsey" wrote:

Hmmm.. 12.375 days would translate to 12 days 9 hours, wouldn't it?

IF (a) all your time spans are less than 32 days, and (b) you're using
the 1900 date system, you could just choose Format/Cells/Number/Custom:

d "days" h "hrs."

(which will round to the nearest hour).

Otherwise you could use

A1: 12.375
B1: =INT(A1) & TEXT(A1," \da\y\s h \hr\s.")


In article ,
Woodturner wrote:

How can I convert decimal days, eg 12.375 days, to days and whole
hours? Ex.
12 days 3 hrs.?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating elapsed days and hours LauriS Excel Discussion (Misc queries) 4 August 25th 06 05:40 AM
Calculating number of hours accross days MTLeslie Excel Worksheet Functions 6 August 22nd 06 12:39 PM
Calculating number of hours between two days NMM Excel Worksheet Functions 1 October 21st 05 11:36 AM
Problem calculating Days/Hours etc between 2 dates Paul Sheppard Excel Discussion (Misc queries) 2 August 7th 05 10:32 AM
Help! I am stuck calculating Days, Hours, Mins please help OB1 Excel Worksheet Functions 2 November 15th 04 06:14 PM


All times are GMT +1. The time now is 12:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"