ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Convert hrs into # of yrs/mths/days (https://www.excelbanter.com/excel-discussion-misc-queries/71539-convert-hrs-into-yrs-mths-days.html)

dkuz

Convert hrs into # of yrs/mths/days
 

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:)


--
dkuz
------------------------------------------------------------------------
dkuz's Profile: http://www.excelforum.com/member.php...o&userid=31536
View this thread: http://www.excelforum.com/showthread...hreadid=512279


Gary''s Student

Convert hrs into # of yrs/mths/days
 
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"

--
Gary's Student


"dkuz" wrote:


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:)


--
dkuz
------------------------------------------------------------------------
dkuz's Profile: http://www.excelforum.com/member.php...o&userid=31536
View this thread: http://www.excelforum.com/showthread...hreadid=512279



dkuz

Convert hrs into # of yrs/mths/days
 

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

What I want to do is subtract hours from todays date to get a new
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 a
"day" and subtract the "days" from the current date in order to give me
a date that the person started work. Thanks!


--
dkuz
------------------------------------------------------------------------
dkuz's Profile: http://www.excelforum.com/member.php...o&userid=31536
View this thread: http://www.excelforum.com/showthread...hreadid=512279


Dave Peterson

Convert hrs into # of yrs/mths/days
 
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.





dkuz wrote:

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

What I want to do is subtract hours from todays date to get a new
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 a
"day" and subtract the "days" from the current date in order to give me
a date that the person started work. Thanks!

--
dkuz
------------------------------------------------------------------------
dkuz's Profile: http://www.excelforum.com/member.php...o&userid=31536
View this thread: http://www.excelforum.com/showthread...hreadid=512279


--

Dave Peterson


All times are GMT +1. The time now is 10:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com