>SELECT max(cast (Dtyme as datetime)) AS DateTyme, AVG(DCreading) AS DCreading, ; > SPACE(10) AS cDate, SPACE(8) AS cHourMin, ROUND ((cast(dTyme as Datetime) - datetime(1900,1,1,0,0))/10,0) as RoundedSec ; > >FROM CPdata WHERE RType=[DC] ; > GROUP BY 5 ORDER BY 1 && VFP allows to use numbers in the GROUP BY and ORDER BY > INTO CURSOR CPchart READWRITE >>>&& round to 10 seconds.