Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time Calculation

Status
Not open for further replies.

amna77

Programmer
May 27, 2003
69
GB
I want to calculate the time, format i have is hh:mm:ss so for example it says 4:16:19 now i want to divide that by 6. i am not getting the right calculation like that. its giving me 3%. but the correct calculation got to be around 70%. becaue out of 6 hours u spend 4 hours and 17 minutes. cant be 3%. Please help me what should i do. how would i do the calculation in which format.
Thanks in advance
 
Look for some information re date / time data type. It is necessary to understand the data as opposed to the presentation. The ubiquitous {F1} (aka HELP) can be of immense benefit in these simple issues.





MichaelRed


 
3% looks accurate to me since 4:16:19 is about .178.

If you can't find decent Help then post back.

Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
 
A starting point:
MsgBox #4:16:19# / #6:00:00#

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I figured that out. i convert the time by using this formula =(time-INT(time))*24). now i did the calculation, and gives me right answer. 71%
thanks anyway

Now i tried that as well the one PHV said, like #4:16:19# / #6:00:00# , and thats gives me 71% as well.
thanks for help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top