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

Question of time

Status
Not open for further replies.

DRSmith

Technical User
Jul 8, 2000
1
US
I need to be able to calculate (in a query, if possible)the elapsed time between the fields TimeIn and TimeOut.&nbsp;&nbsp;I would prefer the answer just show the total minutes elapsed.<br>Can anyone suggest a way to do this?&nbsp;&nbsp;<br>Thanks in advance!
 
Seems like I just answered this question, maybe at another site.<br><br>Add this fuction to a module:<br><br>Public Function fMinutesElapsed(interval) As Integer<br>If IsNull(interval) Then Exit Function<br>fMinutesElasped = Int(CSng(interval * 1440))<br>End Function<br><br>To use this fundtion in an expression in a query, try this:<br><br>Minutes:fMinutesElapsed([TimeOut]-[TimeIn])<br><br>HTH<br>RDH <p>Ricky Hicks<br><a href=mailto: rdhicks@mindspring.com> rdhicks@mindspring.com</a><br><a href= > </a><br>
 
Seems like I just answered this question, maybe at another site.<br><br>Add this function to a module:<br><br>Public Function fMinutesElapsed(interval) As Integer<br>If IsNull(interval) Then Exit Function<br>fMinutesElasped = Int(CSng(interval * 1440))<br>End Function<br><br>To use this function in an expression in a query, try this:<br><br>Minutes:fMinutesElapsed([TimeOut]-[TimeIn])<br><br>HTH<br>RDH <p>Ricky Hicks<br><a href=mailto: rdhicks@mindspring.com> rdhicks@mindspring.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top