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

subtracting dates

Status
Not open for further replies.

notreconised

Technical User
Jul 21, 2002
14
0
0
GB

on a report i have to boxexs which display a start time and finish time from a table i need to subtract the two dates/times from each other to leave the diferance in hours
ie 14/3 0600 - 16/3 0810 = 50.10Hrs

i have tried subtractin in contoll source but thids makes no calculation for days

thanks for any help in advance
 
Try using the Datediff function which finds the difference between 2 dates using the interval you specify. The example below would give the difference in hours ("h") between Date1 and Date2.

DateDiff("h", Date1, Date2)

Hope this Helps!
Further info on this function is available in the access help files!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top