+ Reply to Thread
Results 1 to 4 of 4

Convert hrs into # of yrs/mths/days

  1. #1
    Registered User
    Join Date
    02-14-2006
    Posts
    4

    Question 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

  2. #2
    Gary''s Student
    Guest

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


  3. #3
    Registered User
    Join Date
    02-14-2006
    Posts
    4

    not clear

    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!

  4. #4
    Dave Peterson
    Guest

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1