Here's a formula I use to calculate seconds between two times. I want to show the seconds as minutes:seconds instead of seconds both in the text below the chart and in the label of the chart too. I was thinking I might try using the Time(0,0,0) formula to get hh:mm:ss, but I did not get the result I wanted. I could write my own formula that converts it into minutes and seconds using divide by 60, but I figured Crystal would have a built-in function I could use instead, but I still have my doubts about minutes and seconds appearing on the bar chart label and axis labels. Here's my formula. Thanks very much.
If IsTime ({master.T_FA_ATPT}) and IsTime ({master.T_SHOCK}) and
{master.shock_agcy} = "FD ALS" then
NumberVar totalsec:=Time({master.T_SHOCK})-Time({master.T_FA_ATPT});
If IsTime ({master.T_FB_ATPT}) and IsTime ({master.T_SHOCK}) and
{master.shock_agcy} = "FD BLS" then
NumberVar totalsec:=Time({master.T_SHOCK})-Time({master.T_FB_ATPT});
If IsTime ({master.T_FA_ATPT}) and Not IsTime ({master.T_FB_ATPT}) and IsTime ({master.T_SHOCK}) then
NumberVar totalsec:=Time({master.T_SHOCK})-Time({master.T_FA_ATPT});
If Not IsTime ({master.T_FA_ATPT}) and IsTime ({master.T_FB_ATPT}) and IsTime ({master.T_SHOCK}) then
NumberVar totalsec:=Time({master.T_SHOCK})-Time({master.T_FB_ATPT});
totalsec;
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site:
www.stephenkramer.comWould you believe Far Side Lite?
More than 270 original cartoons.