+ Reply to Thread
Results 1 to 8 of 8

Need Formula to convert seconds to dd/mm/yyy 00:00:00 format

  1. #1
    Registered User
    Join Date
    03-05-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Post Need Formula to convert seconds to dd/mm/yyy 00:00:00 format

    I have a column of serial numbers that represent date/time in seconds. This column of time is the result of a ODBC connection to a Oracle DB Table in one of our Genesys databases.

    Here are few examples.
    1327932243
    1327934323
    1327935422
    1327935705

    I would like to know how to convert these serial numbers to a mm/dd/yyyy hh:mm:ss format.

    Thanks.

    Sandy

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Need Formula to convert seconds to dd/mm/yyy 00:00:00 format

    With data in A1 on down, in B1 enter:

    =A1/(60*60*24) then format Custom "mm/dd/yyyy hh:mm:ss"

    To display:

    01/28/1942 14:04:03
    01/28/1942 14:38:43
    01/28/1942 14:57:02
    01/28/1942 15:01:45
    Gary's Student

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Need Formula to convert seconds to dd/mm/yyy 00:00:00 format

    is that unix time?
    =A1/(60*60*24)+"1/1/1970"
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,131

    Re: Need Formula to convert seconds to dd/mm/yyy 00:00:00 format

    you mean into days hours an mins

    divide by 86400 to get days and format as DD hh:mm:ss
    so =A1/86400 and format custom: dd hh:mm:ss

    1327932243 = 28days 14hrs 04min 03seconds

    1327935705 = 28 15:01:45

  5. #5
    Registered User
    Join Date
    03-05-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Thumbs up Re: Need Formula to convert seconds to dd/mm/yyy 00:00:00 format

    The formula Martin posted works great, Thanks.

    However, this formula returns the time in the GMT 0 time zone. Sorry to ask, but what change do I need to make to convert to GMT-6 timezone?

    I verified the time stamp using GMT -6 timezone and that matches the auto generated reports. This formula is to convert the time format I get from the database.

    Thanks again for such a quick response.

    This is the link I found that will convert the timestamp just to verify. The formula I need for my spreadsheet.
    http://www.timestampgenerator.com/da...mp/1362138581/

    martindwilson
    Re: Need Formula to convert seconds to dd/mm/yyy 00:00:00 format

    is that unix time?
    =A1/(60*60*24)+"1/1/1970"

  6. #6
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Need Formula to convert seconds to dd/mm/yyy 00:00:00 format

    Most of Texas (eastern part) is 6 hours behind GMT. So if it is 11:00 AM in Greenwich, it would be 5:00 AM in Texas, so:

    =A1/(60*60*24)+"1/1/1970"-.25

    See if this works for you.

  7. #7
    Registered User
    Join Date
    03-05-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Need Formula to convert seconds to dd/mm/yyy 00:00:00 format

    Yes, that formula worked perfectly! Thank you so much.

  8. #8
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Need Formula to convert seconds to dd/mm/yyy 00:00:00 format

    You are quite welcome. Thanks for the feedback.

+ 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