+ Reply to Thread
Results 1 to 4 of 4

Date format and difference in time

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    tampa
    MS-Off Ver
    excel for mac 2011
    Posts
    2

    Date format and difference in time

    I have a log that creates date like 20130221:19:24:50:026666. I ultimately want to convert that into a date/time and do a date diff function on that date and another like it to get the elapsed time.

    I tried just splitting it into date and time and the date part 20130221 with custom format of yyyymmdd, but it just returns ########## in the cell.

    Is there a way to convert the whole thing into a date/time where I can then subtract from another and get elapsed time. If not, is there just a way to create the date format and time format? I does not seem to work.

    Thanks,
    Tim

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Date format and difference in time

    If your date is in Cell B2, this formula will return your date and time:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Please click the * icon below if I have helped.

  3. #3
    Registered User
    Join Date
    02-27-2013
    Location
    tampa
    MS-Off Ver
    excel for mac 2011
    Posts
    2

    Re: Date format and difference in time

    Thanks a bunch, that worked for formatting.

    Now how would I do a difference of those dates to show that the elapsed time between them was 5 hours 4 minutes and 4 seconds?

    Thanks in adavance,

    Tim

  4. #4
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Date format and difference in time

    All you would need to do is =B3-C3, if B3 is your converted end date, and C3 is your converted start date.
    If you wanted one formula to show you the difference, referencing the original unformatted dates, you could use the following (B2 is the end date, C2 is the start date):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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