Convert hrs into # of yrs/mths/days

D

dkuz

I want to convert hours into # of years, months and days. I have built a
formula that does it but it is not accurate as it's based on each month
being 30 days....any help with this would be appreciated:)
 
G

Gary''s Student

As you pointed out the conversion need a starting date to make sense. For
example 700 hours starting from the beginning of Jan.2006 is 0 years, 0
months, 29 days
700 hours starting from the beginning of Feb 2006 is 0 years, 1 months, 1 days


Put the starting date in A1
Put the total hours in B1
Put =A1+B1/24 in C1
In D1 put:
=DATEDIF(A1,C1,"y") & " years, " & DATEDIF(A1,C1,"ym") & " months, " &
DATEDIF(A1,C1,"md") & " days"
 
D

dkuz

I was not clear in my question.....

What I want to do is subtract hours from todays date to get a ne
date:

For example if today is Feb 14, 2006 and someone has worked 12354 hrs
and they work 7 hours a day......I want to convert every 7 hrs into
"day" and subtract the "days" from the current date in order to give m
a date that the person started work. Thanks
 
D

Dave Peterson

With the date in A1 and the number of hours in B1:

=A1-((B1/7)/24)

Days are whole numbers and hours are 1/24th of a day.

Give the cell a date format.
 
Top