Joined: 05 Dec 2007
Location: United States
Online Status: Offline
Posts: 1
Topic: Difference between 2 Times Posted: 05 Dec 2007 at 9:05am
I have a database with a Time_In and Time_Out field. How do I calculate the difference in the two times, meaning the total time of the call, and display it on a Crystal report? Any help would be appreciated
Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Posted: 07 Dec 2007 at 6:18am
You'll want to use the DateDiff function.
If you just want, say, the number of minutes, it would look like:
DateDiff("n",{Time_In},{Time_Out})
If you want it to look like HH:MM:SS, your best bet is to take the difference in days, then use TimeValue to get the time. If it may be multiple days, use Floor to get the number of days (TimeValue won't give you more than 24 hours).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum