How to define the "where clause" in SFDC SOQL to extract the date that have been modified in last 24 hours. Thanks.
PS : I am using the QUERY rest URI for query the data.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityYou can use the existing LastModifiedDate or SystemModStamp fields in your SOQL query (See System Fields). The LAST_N_DAYS
or TODAY
date literals may be useful. Otherwise you can use a specific calculated UTC Date time value.
Select Id from Account where SystemModStamp >= LAST_N_DAYS:1
Select Id from Account where SystemModStamp >= 2014-11-19T23:01:01Z
There was a recent blog post on the performance implications of LastModifiedDate vs SystemModStamp - Force.com SOQL Performance Tips: LastModifiedDate vs SystemModStamp
SystemModstamp
gets updated for all changes and is strictly read-only. LastModifiedDate
is only for user changes and can be updated.
Nov 20, 2014 at 21:28