Changing the export to include the to_date in its range search.