Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculating elapsed days and hours | Excel Discussion (Misc queries) | |||
Calculating number of hours accross days | Excel Worksheet Functions | |||
Calculating number of hours between two days | Excel Worksheet Functions | |||
Problem calculating Days/Hours etc between 2 dates | Excel Discussion (Misc queries) | |||
Help! I am stuck calculating Days, Hours, Mins please help | Excel Worksheet Functions |