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!

Time calculations

Status
Not open for further replies.

benshsms

IS-IT--Management
Mar 3, 2004
8
GB
Basic one really but struggling with it

I have 2 time fields and want to calculate the difference between the two (with the result being a time). Datediff doesnt work becuase they are time variable (its part of a larger calc so I dont want to convert the variate to a datetime). I've tried just doing

endtime - starttime

but the result appears somewhat strange (for example endtime of 20:00 - start time of 08:00 comes out as 43,200

Any help gratefully received
 
Use:

DateDiff("n",DateTime(currentDate,{starttime}),DateTime(currentDate,{endtime}))

Reebo
UK

Please Note - Due to current economic forcast and budget constraints, the light at the end of the tunnel has been switched off. Thank you for your cooperation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top