Help get this topic noticed by sharing it on Twitter, Facebook, or email.

OpenQuery and Datetime field problem

I have this snippet of SOQL in a OpenQuery:

From Quotes__c
Where Quote_Type__c = ''New''
And (Product_Id__c In (''CAR'', ''TOY'', ''TREE'')
And CreatedDate > 2012-11-05) ')

It errors with this message:
Error: INVALID_FIELD: And CreatedDate > 2012-11-05)
value of filter criterion for field 'CreatedDate' must be of type dateTime and should not be enclosed in quotes

CreateDate is defined as a Datetime field and there are no quotes surrounding the date.
1 person has
this question
+1
Reply