Added the ability to query for data within a time range.