You need to sign in to do that
Don't have an account?
duc.lam
SOQL: if you specify a date format value, you can filter on date fields only
Hi,
I was using API 6.0 and am trying to upgrade to the current API 9.0. With 6.0, I was able to filter on date and non-date fields as follows:
SELECT CaseNumber FROM Case WHERE isClosed = FALSE AND CreatedDate >= 2006-01-01
It seems that with API 9.0, this is no longer the case. Specifically, the SOQL SELECT documentation states:
"A fieldExpression uses different date formats for date or dateTime fields. If you specify a dateTime format in a query, you can filter on dateTime fields only. Similarly, if you specify a date format value, you can filter on date fields only:"
I did try to submit the above query, but received an InvalidSObjectFault.
Does anyone know how I can rewrite the above to accomplish the same thing as before?
Superfell
SELECT CaseNumber FROM Case WHERE isClosed = FALSE AND CreatedDate >= 2006-01-01T00:00:00Z
duc.lam
Thank-you!