+ Reply to Thread
Results 1 to 8 of 8

Convert Seconds into 12 Hour Days

  1. #1
    Registered User
    Join Date
    10-09-2018
    Location
    Atlanta
    MS-Off Ver
    365
    Posts
    7

    Convert Seconds into 12 Hour Days

    I need to convert seconds into a 12 hour day

    For example, starting with 99524 seconds

    99524/86400 returns a value of 1.15189815

    Formatted in a Custom Format of dd:hh:mm returns 01:03:38 (1 day, 3 hours, and 38 minutes).

    However, I need this in days of 12 hours each instead of 24, so the value I'm looking for is 2:03:38 (2 days, 3 hours, 38 minutes).

    Any recommendations on how to achieve this would be greatly appreciated.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,504

    Re: Convert Seconds into 12 Hour Days

    I can get you there in two steps though it is off by a minute...
    assuming your data is in A2
    step 1, use this in cell B2...
    =CONVERT(A2,"sec","hr")/12
    step 2, use this in cell C2...
    =LEFT(B2,SEARCH(".",B2)-1)&" days, "&MID(B2,3,1)&" hours, "&MID(B2,5,2)&" minutes"
    it will give you 2 days, 3 hours, 37 minutes
    just misses your minutes by one, doesn't round up

    I'm sure someone will give you a better one.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    10-09-2018
    Location
    Atlanta
    MS-Off Ver
    365
    Posts
    7

    Re: Convert Seconds into 12 Hour Days

    Thank you for the reply!

    That gets me almost there. At least I now know it's possible.

    Is there a way to maintain the format of DD:HH:MM so that the value can be utilized for other calculations?

    Or an alternative format that can be used in other calculations?

    Thanks!

  4. #4
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,791

    Re: Convert Seconds into 12 Hour Days

    =int((99524/86400))*2+mod((99524/86400),1)

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,924

    Re: Convert Seconds into 12 Hour Days

    Quote Originally Posted by Mgiffune View Post
    so the value I'm looking for is 2:03:38 (2 days, 3 hours, 38 minutes
    Try:

    =A1/86400+INT(A1/86400)

  6. #6
    Valued Forum Contributor Root_'s Avatar
    Join Date
    07-29-2017
    Location
    _
    MS-Off Ver
    2010+
    Posts
    485

    Re: Convert Seconds into 12 Hour Days

    Quote Originally Posted by Mgiffune View Post
    I need to convert seconds into a 12 hour day...
    Is this what you need?

    =INT(A1/43200)+MOD(A1,43200)/86400

    Also, a thing to keep in mind: with a dd:hh:mm custom format, you are limited to 31 days.

  7. #7
    Registered User
    Join Date
    10-09-2018
    Location
    Atlanta
    MS-Off Ver
    365
    Posts
    7

    Re: Convert Seconds into 12 Hour Days

    Thank you for the responses. Several of these seem to be giving the results I'm looking for. I need to play with them to see which will work best.

    Much appreciated!

  8. #8
    Registered User
    Join Date
    10-09-2018
    Location
    Atlanta
    MS-Off Ver
    365
    Posts
    7

    Re: Convert Seconds into 12 Hour Days

    For anyone else looking for this, this gave me the results I was looking for and calculated dd:hh:mm based on a 12 hour clock, computed from seconds (entered in A1)

    86400 seconds (24 hours) = 02:00:00
    etc


    Some of the others worked until the days rolled after 12 hours


    =INT(A1/43200)+MOD(A1,43200)/86400

+ 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. [SOLVED] Convert seconds to years, months, days, hours, minutes snd seconds
    By Tresfjording in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-14-2022, 12:55 AM
  2. Help with DAys/Hour/Minute/Seconds
    By RavensFtw in forum Excel General
    Replies: 6
    Last Post: 09-19-2014, 11:09 PM
  3. How to Convert Day:Hour:Minutes:Seconds into Time Format
    By inder2201 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-29-2014, 02:43 AM
  4. [SOLVED] Need Help to convert a string containing Day, Hour, Mins, Seconds to Minutes
    By aSquared in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-02-2014, 06:43 AM
  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 number (integer) into hour:minute:seconds
    By maacmaac in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-01-2011, 08:56 AM
  7. Convert Decimal - Days, Hours and Seconds
    By aidan80 in forum Excel General
    Replies: 4
    Last Post: 05-11-2009, 05:15 PM

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