You need to sign in to do that
Don't have an account?

SOQL SELECT Query
I have an object with a datetime field. I want to select all records from this object where the datetime's month and year value, equals the current month and year.
So it might look like
SELECT Name FROM myObj__c WHERE date_time.getMonth() = currentMonth AND date_time.getYear() = currentYear
Any help is much appreciated!
So it might look like
SELECT Name FROM myObj__c WHERE date_time.getMonth() = currentMonth AND date_time.getYear() = currentYear
Any help is much appreciated!
http://www.salesforce.com/us/developer/docs/api/index_CSH.htm#sforce_api_calls_soql_select_dateformats.htm
You can try THIS_MONTH and THIS_YEAR in your Where clause.