+ Reply to Thread
Results 1 to 3 of 3

getting the difference bewtween two times accounting for midnight cross over

  1. #1
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    getting the difference bewtween two times accounting for midnight cross over

    Hi I am looking for a way to subtract NOW() from a particular cell which has an example time of 17:23. how do i write the formula and account for midnight crossover.

  2. #2
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: getting the difference bewtween two times accounting for midnight cross over

    Why can't you use:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    As for midnight crossover - how will you know if 17:23 is today or the next/previous day?

    Will the difference to be calculated always be less than 24 hours?
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: getting the difference bewtween two times accounting for midnight cross over

    You could also test using the MOD function. A formula like this
    Please Login or Register  to view this content.
    will always give the right time difference even if it passes midninght.

    Alf

+ 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. Calculating time difference over midnight!
    By sygazelle in forum Excel General
    Replies: 14
    Last Post: 05-28-2022, 04:20 PM
  2. [SOLVED] formula to calculate time difference crossing midnight
    By ditorejax in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-06-2014, 08:27 PM
  3. difference between times not working for after midnight.
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-28-2013, 01:47 AM
  4. Replies: 4
    Last Post: 11-28-2010, 08:18 PM
  5. Replies: 1
    Last Post: 06-30-2010, 07:48 PM

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