Convert Number to Hour

bodylojohn

Registered User.
Local time
Today, 10:59
Joined
Dec 28, 2005
Messages
205
Hello Everybody...

I have a Question.
How do I convert a number (26) to 26:00 Hours.

The thing is.
I have a database that calculates the hours of overtime.

for example.

I work from 7:00 to 19:00.
Then I get 12:00 hours of total time.

The above is no problem.

But no I want to deduct the number 2 from 12:00 hours.

I hope to hear from u guys soon
 
Time

In a query put the following:

expr1: DateDiff("n",[begintime],[endtime])
expr2: [expr1]\60
expr3: [expr1]\60 & ":" & Format([expr1] Mod 60,"00")

In expr1 have difference between 7:00 and 19:00 expressed in minutes.
In expr2 have expr1 as hours, in this case 12. You can subtract whatever you want from this and then...
expr3 formats it as 12:00.

Hope this helps. Just remember that regular numbers are based on 10 (1.1,1.2...1,9,2.0) where Time is 60.
 
Thank you very very much Rickster57
 

Users who are viewing this thread

Back
Top Bottom