-1

当我尝试使用 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());

请告诉我需要发送哪种格式的日期时间?

4

1 回答 1

0

这是您需要使用的数据格式:

  <StartCreatedTMS>2009-11-17T22:35:08.0Z</StartCreatedTMS> 
  <EndCreatedTMS>2010-01-08T20:54:56.0Z</EndCreatedTMS> 

谢谢贾里德
_

于 2013-06-10T16:44:06.050 回答