DateDiff

JonyBravo

Registered User.
Local time
Today, 18:04
Joined
Jan 17, 2006
Messages
89
Hi there.

I'm using the following code in my Access aplication:
DateDiff("h", IncStart, txtrts)

My problem is i need the exactly time difference and if the difference is 2hours and 15 mins it will display only 2 hours. Is there any way to do that? I've tryed in min but it display 135 mins.
 
Can you datediff() it in minutes then format it in hours:minutes?

ken :)
 
Do it with minutes(135), then divide by 60 (2.25) and use the modulo (15) to show the minutes and use the initial number minus the modulo (120) divided by 60 to get the hours(2).

EDIT: Ken's idea looks much better. You should try his way first.
 
Last edited:
Thanks for your quick response.
Newman, I've donne what you said, divide by 60 and I get 2.25. I just dont' understand what do you mean with modulo (15).
So, I have this formula: Duration = DateDiff("h", IncStart, txtrts) / 60
What should I do next?
 

Users who are viewing this thread

Back
Top Bottom