+ Reply to Thread
Results 1 to 6 of 6

Convert seconds to years, months, days, hours, minutes snd seconds

  1. #1
    Forum Contributor
    Join Date
    08-30-2015
    Location
    Tresfjord, Norway
    MS-Off Ver
    365
    Posts
    169

    Convert seconds to years, months, days, hours, minutes snd seconds

    Hei ...

    Been searching this forum and the net, but I can't get different tips to work right.
    I have this spreadsheet, to tell time to travel between to places in the universe, f.ex. from Earth to Aplha Cenaturi, a distance of 4,2 light years.

    Travelling at 1 LightMac(LM) as I like to call it, it would take 4,2 years, accelleration and deacceleration not taken into consideration.

    Here is the formula;
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The value of E17 is 662 695 446 seconds. That is how many seconds the flight will take at 0.20 LM.
    The answer I get is; 21 years, 6 months, 2 weeks 0 days, 6 hours, 6 minutes 6 seconds
    What ever I do, hours, minutes and seconds comes out with the exact same number.

    There is probably som vba code about this, and tips are thanksfully recieved.

    Any suggestions?

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Convert seconds to years, months, days, hours, minutes snd seconds

    Hi. Your formula is incorrect.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    On the sheet attached, reset the values in C2 and C3 to 1....

    Incidentally, I assumed that all months contain 30 days.... over such times/distances the odd 31 and 28/29 will make little appreciable difference!!
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 03-04-2018 at 03:05 PM.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    08-30-2015
    Location
    Tresfjord, Norway
    MS-Off Ver
    365
    Posts
    169

    Re: Convert seconds to years, months, days, hours, minutes snd seconds

    Thanxs a lot!!
    That did it!

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Convert seconds to years, months, days, hours, minutes snd seconds

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  5. #5
    Registered User
    Join Date
    01-13-2022
    Location
    London
    MS-Off Ver
    2016
    Posts
    1

    Re: Convert seconds to years, months, days, hours, minutes snd seconds

    Hey! I wanted to ask you if it is possible to take into account the days in the months 28,29,30,31?

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Convert seconds to years, months, days, hours, minutes snd seconds

    Quote Originally Posted by Jiraya View Post
    Hey! I wanted to ask you if it is possible to take into account the days in the months 28,29,30,31?
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 10-21-2017, 10:26 AM
  2. Convert a value to Years, Months, Days, Hours and Minutes
    By )3az_)3aziah in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-30-2017, 11:18 AM
  3. convert days hours minutes seconds to just minutes
    By hollylynn in forum Excel General
    Replies: 4
    Last Post: 08-28-2015, 08:53 AM
  4. Convert Days:Hours:Minutes:seconds to minutes.
    By Kevingardner1 in forum Excel General
    Replies: 4
    Last Post: 06-03-2014, 06:44 PM
  5. Convert days -> Years, Months, Days, Hours, Minutes, Seconds
    By brharrii in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-06-2012, 06:44 PM
  6. convert from seconds to form hours: minutes: seconds?
    By nguyen_han in forum Excel General
    Replies: 2
    Last Post: 10-13-2011, 06:56 AM
  7. Days, hours, minutes and seconds
    By Nunzio in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-24-2008, 07:59 AM

Tags for this Thread

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