Search for data between two dates

Looking to pull data from the database in order to do calculations with the Math Expression Formula Calculator plugin however i only want to calculate the data between 2 dates i.e. starting from 20 days ago until 7 days ago. At the moment i am inputing it in the constraint as

date created > current date/time+days (-20)
date created < current date/time+days(-7)

However the Math Expression Formula Calculator is not calulatiing it correctly. is there any sort of date range api in can use then pull from there maybe? Really not to sure where to go from here any help would be greatly appreciated.