function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
danlb_2000danlb_2000 

Get Deleted Objects Resource

I am trying out the new REST API Get Deleted Objects Resource in the Winter '14 release.  When I try to make a call to the API using the URI like the one in the Release Notes:

 

/services/data/v29.0/sobjects/Contact/deleted/

?start=2013-05-05T00:00:00+00:00&end=2013-05-10T00:00:00+00:00

 

I get the error:

 

"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."

 

I am calling this from a C# program which works fine for other REST API calls, I just can't seem to get this one to work.

SuperfellSuperfell

You need to URLEncode the date/time values (the + will be breaking things)

Subhani PSubhani P

Hi,

 

use DateTime.ParseExact method

 

var dateString = dr["business_dt"].ToString();var format ="MM/dd/yyyy hh:mm:ss tt";var dateTime =DateTime.ParseExact(dateString, format,CultureInfo.InvariantCulture);dr["StartDate"]= dateTime;

 

Please refer the below link also,

 

http://stackoverflow.com/questions/7766187/error-when-parsing-datetime

 

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

 

Thanks,
Subhani,
Salesforce Certified Developer,
www.mydbsync.com