You need to sign in to do that
Don't have an account?
Vishnu_SFDC
How to compare date with another custom date in an SOQL query
Hello,
Below is the requirment.
I have to get all records which are greater than a custom date(which is calculated in apex class).
example:
list<event__c> e = [select Id,Start_Datetime__c From event__c Where Start_Datetime__c > "Custom date" ];
Thanks,
Vishnu
Below is the requirment.
I have to get all records which are greater than a custom date(which is calculated in apex class).
example:
list<event__c> e = [select Id,Start_Datetime__c From event__c Where Start_Datetime__c > "Custom date" ];
Thanks,
Vishnu
I'm Shingo Yamazaki, a Japanese Developer.
How about trying like this?
(add colon (":") to variable you declared in your Apex.)
you probably have to use "Datetime" type variable to compare.
Regards,
Shingo.
http://mysalesforcecode.blogspot.sg/2009/02/date-formats-and-date-literals-in-soql.html
http://www.salesforce.com/us/developer/docs/officetoolkit/Content/sforce_api_calls_soql_select_dateformats.htm