Checking Expiry Date

Checking Expiry Date

Hi,

Im new to Zoho creator, i need to create a function or query for my report to show records expiring in the (x) days. I have a expiry_date field and i try using 

Expiry_Date.toLong() / (1000  *  3600 * 24)) <= 30

Im getting an error " Invalid Search Criteria"

Thanks in advance