Data Export showing all data

I’m having and issue with exporting data. When I export data from time-range i’m still getting all data from the time I started collecting data.
I have 4 sql queries being performed which are:
SELECT insertDate as “time”, weight as “OverWeight” from ProductionData.dbo.checkweigher
WHERE hardwareID = ‘1’ AND code = ‘004’
ORDER BY insertDate desc
SELECT insertDate as “time”, weight as “UnderWeight” from ProductionData.dbo.checkweigher
WHERE hardwareID = ‘1’ AND code = ‘005’
ORDER BY insertDate desc
SELECT insertDate as “time”, weight as “Dbl-Prod” from ProductionData.dbo.checkweigher
WHERE hardwareID = ‘1’ AND code = ‘002’
ORDER BY insertDate desc
SELECT insertDate as “time”, weight as “Metal” from ProductionData.dbo.checkweigher
WHERE hardwareID = ‘1’ AND code = ‘003’
ORDER BY insertDate desc

This is working fine for the graphs but not for exporting.
I have tried adding in the WHERE $__timeFilter(insertDate) but then I do not get any results for that query on the graph.
Not sure where I went wrong. I was pretty sure you just had to specify the dateTime column with the ‘time’ lable.
Any help would be great.
Thanks