Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Difference between 2 Times Post Reply Post New Topic
Author Message
BlueDigital
Newbie
Newbie


Joined: 05 Dec 2007
Location: United States
Online Status: Offline
Posts: 1
Quote BlueDigital Replybullet 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
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet 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).
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.016 seconds.