Collected data from a certain trend

Hello, I am currently trending data, however I would like to know if their is a way to collect only a certain time frames worth of data and send that over to the SQL server so that it can be collected and then shown on a chart when needed. Thanks