You need to sign in to do that
Don't have an account?
Administrator 167
API REST for XX/updated between 2 datetime
Hellow,
I'm trying to get Get a List of Updated Records Within a Given Timeframe, as explained here:
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_updated.htm
Here is my API:
/services/data/v49.0/sobjects/MyObject/updated/?start=2020-06-07&end=2020-07-07
I tried with many date formats (YYMMMMDD-xx:xx:xx etc.), yet I still get the following error:
INVALID_DATE_FORMAT
message: Error parsing the 'start' date string. This operation requires properly formatted 'start' and 'end' date/time parameters to be specified. Please consult the documentation for the format of these date/time fields.
Can anyone please tell me where I am wrong in my API syntax ?
Thank you,
I'm trying to get Get a List of Updated Records Within a Given Timeframe, as explained here:
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_updated.htm
Here is my API:
/services/data/v49.0/sobjects/MyObject/updated/?start=2020-06-07&end=2020-07-07
I tried with many date formats (YYMMMMDD-xx:xx:xx etc.), yet I still get the following error:
INVALID_DATE_FORMAT
message: Error parsing the 'start' date string. This operation requires properly formatted 'start' and 'end' date/time parameters to be specified. Please consult the documentation for the format of these date/time fields.
Can anyone please tell me where I am wrong in my API syntax ?
Thank you,
Note: 'startDate' cannot be more than 30 days ago
Hope this helps..
All Answers
That's a "T" between the date and the time and a "Z" at the end. Date variables in SOQL take the format YYYY-MM-DD.
Check below date formats.
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm
Thanks,
Yet you do not answer the question: why is the following API statement false ?
/services/data/v49.0/sobjects/MyObject/updated/?start=2020-06-07&end=2020-07-07
Note: 'startDate' cannot be more than 30 days ago
Hope this helps..