Results 1 to 2 of 2

Thread: Time elapsed !

  1. #1

    Thread Starter
    Member Alankar's Avatar
    Join Date
    Jun 2005
    Location
    Ghaziabad, India
    Posts
    40

    Unhappy Time elapsed !

    Hi All,

    I am totally confused now and putining it on the forum now. I am using MS Access.

    I have two fields, one is Integer (name Field1) and second is string (name Field2) and have data like 143:25 (hh:mm). Now I want to subtract
    Field1-Field2, and the result should be in hh:mm format.

    How could I do it, I am doing it in query, So need a formula to get this.

    Regards,
    Alankar
    The rest of mind is not in rest, It rests in rest.

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Time elapsed !

    Not sure if this will help but... Here goes.

    1 (double) = 1 day = 24 Hours
    = 1440 minutes

    You grab the hours from your text, multiple up for minutes.
    Add on any extra minutes.
    Divide this total by 1440
    This should give you a double value that is the total time.

    Example:
    ((143*60)+25)/1440 = 5.97569444444444

    Compare this to your other number (use clng/cint to convert to comparitive type, or store a double of the other total.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width