+ Reply to Thread
Results 1 to 4 of 4

Calculate the number of days, hours, minutes and second between two dates

  1. #1
    Registered User
    Join Date
    02-26-2013
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    4

    Calculate the number of days, hours, minutes and second between two dates

    Hi there,
    I am trying to analyse some tasks and how long they take in each instance. I need to know how many days, hours, minutes and seconds occurred between two dates. The difficulty i'm facing is that the range is larger than 30 days.

    Plus I then sort them and they sort by numerical number not by number of days.

    Please help! I'm sure this is relatively easy for the super users on here!

    Cheers, Trelacmv
    Attached Files Attached Files

  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 2406
    Posts
    44,662

    Re: Calculate the number of days, hours, minutes and second between two dates

    Easiest is to use:

    =B2-A2

    format as [h]:mm:ss

    and then sort...
    Attached Files Attached Files
    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

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: Calculate the number of days, hours, minutes and second between two dates

    Try
    =INT(B2-A2)&":"&TEXT(B2-A2,"hh:mm:ss")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Registered User
    Join Date
    02-26-2013
    Location
    Brisbane, Australia
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Calculate the number of days, hours, minutes and second between two dates

    Thanks Guys,

    Yup, I did it slightly differently by splitting the cells into two per timestamp column and then adding the related two columns together and
    and then subtracting them from each other and them ultiplying that answer by 24. This gave a decimal figure for the number of hours difference. Perfect!

+ 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 number to Days/hours/Minutes after 31 days
    By MB77035 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-05-2015, 11:45 AM
  2. Calculate Days, Hours & Minutes Worked
    By Mulderman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-08-2015, 09:15 PM
  3. Replies: 6
    Last Post: 12-01-2012, 05:28 PM
  4. Replies: 2
    Last Post: 01-24-2012, 09:20 PM
  5. Replies: 1
    Last Post: 11-02-2011, 06:50 PM
  6. Replies: 1
    Last Post: 11-02-2011, 06:44 PM
  7. Duration of time for two dates in days, hours and minutes
    By sgrimm in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-18-2006, 09:39 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