Sorting the records using a date Field
Hello all,
I have an income expense application and I am trying to show the last 15 days spending in my page. While trying to fetch the records from my expense report I am trying to sort the records based on the date field.
I am trying to set the range from zoho.currentdate to zoho.currentdate.subday(15). Though there are few records I am getting an empty collection.
date1 = zoho.currentdate;
date2 = zoho.currentdate.subDay(15);
allexpenses = Expense[Account_Number == accNo] sort by Date_of_Spending desc range from date1 to date2;
Please guide me how we can go on with this,
Thanks and regards,
Priya S