+ Reply to Thread
Results 1 to 6 of 6

How to Find which one is greater between 2 times

  1. #1
    Registered User
    Join Date
    10-23-2010
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    43

    How to Find which one is greater between 2 times

    Hi All,
    I am trying to use If condition to find which one is the max time however i am not able to do it.Below is the example



    "Login Time
    IST" Actual Login Time Discrepancy
    23:45 23:53
    18:15 18:35
    18:15 18:13
    19:15 19:14
    18:15 18:15

    In discrepancy i need to check if actual login time is more time than login time IST then it should subtract actual login time from login time IST or else it should display login time IST .

    Note: Actual Login Time is in Time format.
    Last edited by anto1510; 12-05-2010 at 06:48 AM.

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

    Re: How to Find which one is greater between 2 times

    What happens when the times cross midnight - eg "IST" 23:55 and "Actual" 0:30 ?

    I suspect you will need to build in some logic to differentiate the above from the likes of example 3, ie:

    Please Login or Register  to view this content.
    in the above we calculate the time difference where either Actual exceeds IST or where the hour differences would imply a midnight cross over
    (in the latter case the Actual Time precedes the IST Time despite being "greater" in reality)
    Last edited by DonkeyOte; 12-05-2010 at 05:20 AM. Reason: revised FALSE from 0 to $A2 given IST requirement

  3. #3
    Registered User
    Join Date
    10-23-2010
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: How to Find which one is greater between 2 times

    What if the actual login time is in date and time format (12/2/2010 8:00) ?

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

    Re: How to Find which one is greater between 2 times

    If that's the case it's simply

    Please Login or Register  to view this content.
    Dates and Times in Excel are just numbers.
    Dates being Serial Numbers and Time being decimal (1 equating to 24 hours)
    It is the Date Format applied to those Numbers that generates the Date "strings" as you see them - if you format as General you will see the underlying numeric.
    Last edited by DonkeyOte; 12-05-2010 at 05:57 AM. Reason: reworded

  5. #5
    Registered User
    Join Date
    10-23-2010
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: How to Find which one is greater between 2 times

    what i actually meant is explained with below example

    "Login Time
    IST" Actual Login Time
    23:45 12/2/10 11:53 PM

    your forluma is not working with the above example

  6. #6
    Registered User
    Join Date
    10-23-2010
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    43

    Re: How to Find which one is greater between 2 times

    okay i got it.

+ 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