I have a custom object having a Date field Expense__Date__c
I need to perform a soql query on the custom object where Expense__Date__c = THIS_MONTH
So my query looks like
List<CustomObj__c> list = [select Name from CustomObj__c where Expense__Date__c = THIS_MONTH];
But it gives an error Unexpected token : THIS_MONTH
When I try to do something like this
List<CustomObj__c> list = [select Name from CustomObj__c where Expense__Date__c.month() = :Date.Today().Month()];
It gives in error unexpected token ')'
How do I perform this filter - where the month for that date field is current month, in a soql query?