|
-
Jul 4th, 2005, 07:11 AM
#1
Thread Starter
Member
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. 
-
Jul 4th, 2005, 08:50 AM
#2
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.
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|