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!

adding times 2

Status
Not open for further replies.

p658484

Technical User
Joined
Feb 12, 2009
Messages
20
Location
CA
Hello
I am trying to add time in a column. Sum and Running totals are not working. I use Crystal 11.
start end timediff
time time
7:07 7:19 0:12
7:07 7:23 0:16
7:19 7:29 0:09
7:23 7:54 0:31
7:29 8:16 0:47
7:54 8:28 0:34
8:16 9:03 0:46
8:28 9:12 0:43
9:03 9:23 0:20

total timediff?
Thank you
 
I am not sure how you're getting the timediff value but wouldn't this work?

Use a formula to get the individual timediff

like this

//seconds between dates
datediff("s",{@time1},{@time2})

You can use this for display purposes placing it to the right of the end time column as you have in your sample.

then creating a running total as follows
Field to summarize = the formula created above
Evaluate -- for every record
Reset (never or as required by your report/data)

This should provide you a total in seconds -- which you can convert to minutes (/60) or hours (/3600) as needed.

Does this make sense?



-- Jason
"It's Just Ones and Zeros
 
If the fields are times, and not datetimes, then use a formula like this:

datediff("s",datetime(currentdate,{table.starttime}),datetime(currentdate,{table.endtime}))

Then insert a sum on this at the group or report level. You can then use faq767-3543 to convert the seconds to the string format display.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top