当我尝试使用 Date 时,我可以从过滤器中获取数据。但是当我尝试使用 DateTime 从过滤器中获取数据时,我无法获取数据。以下是我的请求正文:
Filter=LastUpdatedTime :AFTER: 2013-06-07T15:00:00-0700 :AND: LastUpdatedTime :BEFORE: 2013-06-07T16:56:35-0700&PageNum=1&ResultsPerPage=100
和代码:
requestBody = String.Format(requestBody, pageNumber, pageSize, After.ToString("yyyy-MM-ddTHH:mm:ss"), Before.ToString("yyyy-MM-ddTHH:mm:ss"));
HttpWebRequest httpWebRequest = WebRequest.Create(commonService.ServiceContext.BaseUrl + "vendors/v2/" + commonService.ServiceContext.RealmId) as HttpWebRequest;
httpWebRequest.Method = "POST";
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
string oAuthHeader = GetDevDefinedOAuthHeader(context, httpWebRequest, requestBody);
httpWebRequest.Headers.Add("Authorization", oAuthHeader);
requestXML.Append(requestBody);
UTF8Encoding encoding = new UTF8Encoding();
byte[] content = encoding.GetBytes(requestXML.ToString());
请告诉我需要发送哪种格式的日期时间?