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!

Time calculation coming out wrong

Status
Not open for further replies.

Christy514

Technical User
Nov 9, 2010
1
US
Please Help! I am about to pull my hair out!

I am working on a report in Crystal XI where I am subtracting time to get a total. Example Surgery scheduled for 7:30 {v_basic_booking_data.book_setup_start_time}, patient actually went in the OR at 8:01 {v_CRA_01_Case_Start.time_pat_in_room}. and I want to see a total of 31 minutes to show the delay

So I made a formula that states {v_CRA_01_Case_Start.time_pat_in_room}-{v_basic_booking_data.book_setup_start_time}

The problem is I get a total of 71 instead of 31. I am a beginner to Crystal and can't figure out how to write the formula to get the correct total.

Thanks!

 
It sounds like there is some problem other than just the time diff, as the 71 makes no sense. You probably need groups on operating room and patient. Then in the detail section, place a formula like this:

datediff("n",{v_basic_booking_data.book_setup_start_time},{v_CRA_01_Case_Start.time_pat_in_room})

...where "n" stands for minutes (to distinguish it from months "m").

I would also place the two time fields in the detail section so you can see how they are behaving in relation to the formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top