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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateDiff for Minutes

Status
Not open for further replies.

Kinl

Programmer
Mar 19, 2001
168
US
I have a Access database that holds data for downtime. One field holds the StartTime for the Dowtime, and another field holds the EndTime for the Downtime.
What I'm trying to do is when the txtEndTime box receives the LostFocus() event, I want it to automatically populate the Downtime text box. Therefore, it would grab the second time and subtract it from the first time, and then leaving a total "Downtime" for the Downtime TextBox.
What would be the best way to do this? I had received another way to do it through another forum about a week ago, but I couldnt get it to work. The way that the programmer used it was with the DateDiff() function. But it didnt work if it was for the same day. Example: StartTime: 12:42, EndTime: 15:37. It would not calculate the difference at all.
Does any one have any suggesstions?

Thanx,

Ps, the date format in Access is Medium date.

Donn
 
Never mind, I figured it out. Sorry to bother everyone!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top