+ Reply to Thread
Results 1 to 3 of 3

Time Functions

  1. #1
    Craigger
    Guest

    Time Functions

    I want to take the difference in two times and figure out how many hours and
    minutes there are between them. I already have this working, but my question
    is how to display it in hours and minutes. This is what I have:

    F35 - 7:30:00 PM
    F36 - 11:05:00 PM
    F37 - =IF(G35>F35, (G35-F35)*24, (1+G35-F35)*24)

    F37 has that formula, but will display 3.58, which means 3 hours and 58/100
    of an hour. I would rather this display as hours and minutes. How do I make
    it do that? If anyone can help, I would appreciate it.

    Craig

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,787
    If you want the result as time then you shouldn't multiply by 24, that gives you the time in decimal format. An easier formula to do what you want

    =F36-F35+(F35>F36)

    format as h:mm

    note: your cell references are a bit mixed in your post, I'm assuming start time in F35, end time in F36

  3. #3
    bpeltzer
    Guest

    RE: Time Functions

    Delete the parts of your formula that multiply by 24 and format the cell as a
    time.

    "Craigger" wrote:

    > I want to take the difference in two times and figure out how many hours and
    > minutes there are between them. I already have this working, but my question
    > is how to display it in hours and minutes. This is what I have:
    >
    > F35 - 7:30:00 PM
    > F36 - 11:05:00 PM
    > F37 - =IF(G35>F35, (G35-F35)*24, (1+G35-F35)*24)
    >
    > F37 has that formula, but will display 3.58, which means 3 hours and 58/100
    > of an hour. I would rather this display as hours and minutes. How do I make
    > it do that? If anyone can help, I would appreciate it.
    >
    > Craig


+ 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