当我尝试使用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());
请告诉我需要发送哪种格式的日期时间?
答案 0 :(得分:0)
这是您需要使用的数据格式:
<StartCreatedTMS>2009-11-17T22:35:08.0Z</StartCreatedTMS>
<EndCreatedTMS>2010-01-08T20:54:56.0Z</EndCreatedTMS>
感谢
震动