Skip to Content
0
Former Member
Mar 21, 2008 at 05:09 AM

Formula to calculate Time that has condition.

75 Views

Post Author: alexander_tze

CA Forum: Formula

hi everyone,

i'm new to crystal report 2008, wish that you all can help.

i'm trying to calculate some data from a database. Below was the example of the database.

ID Condition Time Floor

1 1 10:54:48 AM 12 1 10:54:48 AM 29 0 10:55:02 AM 210 0 10:55:16 AM 1

With these database, i'm going to calculate the time for each floor ( floor 1 and 2) with the condition "1" and "0"( "1" for start time and "0" for end time). below was the basic theory for the calculation

(Floor 1 with time (10:54:48) and condition="0" ) - ( Floor 1 with time (10:55:16) and condition="1" )

and the result should be 18 second.

The same theory goes to floor 2(Floor 2 with time (10:54:48) and condition="0" ) - ( Floor 2 with time (10:55:02) and condition="1" )

hope that you guys can help me to create a formula for these "time calculation"