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!

Calculate Hours Between Two Dates 1

Status
Not open for further replies.

dmoran

Technical User
Feb 12, 2004
13
US
I have a form with three fields - [begintime], [endtime],and an unbound [totaltime]. I am trying to use DateDiff to give me a total in hh:nn format but it doesn't seem to recognize the dates. In other words, I'm OK until 23:59 total time. My formatting is 99/99/00" "00:00;0;_

Does anyone have an easy solution?
 
Something like this ?
24*Int([endtime]-[begintime])+Format([endtime]-[begintime],"h") & Format([endtime]-[begintime],":nn:ss")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
synperx3 - I too, am convinced!

PHV - I asked for easy and you came through! Works perfect-Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top