Closed Thread
Results 1 to 10 of 10

Calculate hours and minutes between two dates/times

  1. #1
    Registered User
    Join Date
    10-18-2008
    Location
    UK
    Posts
    2

    Calculate hours and minutes between two dates/times

    Hi team im wondering if you can help!

    Im trying to calculate hours and minutes between two dates/times over more than 24hrs.

    I have:-


    A1 is 18/10/08 13:14, B1 is 20/10/2008 12:20, C1 is 1:23:05

    Using the formula C1 =INT(B1-A1)&TEXT(B1-A1,":hh:mm")

    But what I really need is just Hours and Minutes so the above should read 47:05 !!!!!

    This has stumped me, any help much appreciated

    Regards
    Aid
    Last edited by VBA Noob; 10-18-2008 at 12:57 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    How about simply: =B1-A1 custom formatted as [h]:mm
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-18-2008
    Location
    UK
    Posts
    2

    Genius

    Thanks for that! Ive been working on this for hours and its that simple!

    Just realised ive been using the [h]:mm in another part of the spreadsheet and didnt think of applying it to this situation.

    Again thanks alot, and it just goes to show that you don have to over complicate things.

    Thank you much love goodnight

  4. #4
    Registered User
    Join Date
    04-06-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Calculate hours and minutes between two dates/times

    Great information above and appreciated.

    The next question to this is:

    What if I just want minutes.

    =B1-A1 custom formatted as [h]:mm will give me 16:03 not 963.

    Any help would be appreciated.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculate hours and minutes between two dates/times

    Keen, do not hijack other members' threads - please raise your own question in your own thread.

  6. #6
    Registered User
    Join Date
    04-06-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Calculate hours and minutes between two dates/times

    Apologies, it was not intended that I "hijack" the thread. I thought my question related to it.

    I will re-submit the question as per your instructions.

  7. #7
    Registered User
    Join Date
    01-19-2012
    Location
    maple
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Calculate hours and minutes between two dates/times

    Quote Originally Posted by NBVC View Post
    How about simply: =B1-A1 custom formatted as [h]:mm
    Hello,

    I'm actually trying to do the same thing as the OP, but I have no idea how to custom format as [h]:mm. Could you point me towards a thread that does explain how to?

    Thanks so much.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Calculate hours and minutes between two dates/times

    Right click the cell, click Format Cells and then choose Custom from the Number tab.. then enter the format string in the Type field....

    Any further questions, please start a new thread...

  9. #9
    Registered User
    Join Date
    07-17-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    1

    Re: Calculate hours and minutes between two dates/times

    Hiiii Team,


    Can u plz give me the step by step solution as Im unable to do it.

    when I right click on the respected cell it show's me custom format option disable. kindly guide me need your help badly.
    Im using Windows Office 2007


  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Calculate hours and minutes between two dates/times

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. calculate the number of working hours between two dates
    By sureshchinna_sb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-29-2012, 09:57 AM
  2. Minutes to hours
    By tyger in forum Excel General
    Replies: 6
    Last Post: 05-10-2008, 08:31 PM
  3. Replies: 2
    Last Post: 01-08-2008, 10:51 PM
  4. Converting minutes to hours and minutes
    By dirwin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-01-2008, 02:00 PM
  5. help showing hours and minutes
    By ghynes in forum Excel General
    Replies: 1
    Last Post: 09-14-2006, 08:52 AM

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