[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

Elapsed Time Crystal Report

Can someone please clue me in as to  how to code a Crystal Report to determine the elapsed time between successive events.  That is, I have a table whose records sequentially list event times.  I need to difference them in the report to show the elapsed time.

E.G.
<------- Table Fields/Data--->|    Calc'dField
EventType     EventDateTime     ElapsedTime
A                   1/1/07 12:55 PM
B                    1/1/07 12:57 PM    00:02:00
C                    1/2/07 01:03 AM   00:06:00
...

0
mcn
Asked:
mcn
  • 2
1 Solution
 
mlmccCommented:
Try this formula

If (PreviousIsNull({EventDateTiemField}) then
   0
else
   DateDiff('h',Previous({EventDateTiemField}),{EventDateTiemField})

mlmcc
0
 
mlmccCommented:
Glad i could help

mlmcc
0
 
mcnAuthor Commented:
Glad you did!! Thanks you!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now