DateCheckOutString=Text(TrendStartYear,"0000")+"/"+Text(TrendStartMonth,"00")+"/"+Text(TrendStartDay,"00");
CALL DateGetDays();
TrendStartVal=820454400+DatePastDays*86400+(TrendStartHour - 8)*3600+TrendStartMin*60;
DateCheckOutString=Text(TrendEndYear,"0000")+"/"+Text(TrendEndMonth,"00")+"/"+Text(TrendEndDay,"00");
CALL DateGetDays();
TrendEndVal=820454400+DatePastDays*86400+(TrendEndHour - 8)*3600+TrendEndMin*60;
i=TrendEndVal;
TrendEndVal=TrendEndVal - TrendStartVal;
IF TrendEndVal>1 THEN
DevTrend.ChartStart=TrendStartVal;
DevTrend.ChartLength=TrendEndVal;
HideSelf; { change from Albert 2001/10/10 }
ENDIF;