无法根据日期和日期过滤SharePoint外部列表时间戳记. [英] Not able to filter SharePoint external list based on date & time stamp.

查看:70
本文介绍了无法根据日期和日期过滤SharePoint外部列表时间戳记.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我在SharePoint 2016中使用访问服务,并且基于使用BCS访问的表创建了一些外部列表.

I am using access services in SharePoint 2016 and I created some external lists based on the tables in access using BCS.

由于我们没有外部列表的默认元数据列,因此我编写了宏以更新外部列表中的修改后的列.

As we don't have default metadata columns for an external list I wrote macro to update the modified column in the external list.

使用REST API从服务器中获取数据时,我正尝试根据日期和时间戳过滤修改的列,如下所示.

While fetching the data from the server using REST API, I am trying to filter the modified column based on date and time stamp as shown in the below.

/items?$filter=Modified%20gt%20datetime%272018-05-08T00:15:10.542Z%27&$orderby=Modified%20desc&$top=2000&$skiptoken=Paged=TRUE

/items?$filter=Modified%20gt%20datetime%272018-05-08T00:15:10.542Z%27&$orderby=Modified%20desc&$top=2000&$skiptoken=Paged=TRUE

我没有根据时间戳获得结果.

I am not getting results based on the time stamp. 

如果您需要更多信息,请告诉我.

Please let me know if you need more information.

谢谢

MBKSP

推荐答案

您好mbksp,

Hi mbksp,

您是否在SQL DataTable中修改了列?外部列表不会包含已修改" matadata列作为普通列表,列表数据全部来自SQL DataTable,请参阅此外部列表其余响应:

Did you have Modified Column in your SQL DataTable ? External list won't have "Modified" matadata column as normal list, the list data will all come from SQL DataTable, see this External List Rest Response:

您将需要在SQL DataTable中添加一个DataTime列,例如"Modified":

You will need to add a DataTime Column in SQL DataTable for example 'Modified':

然后使用Rest API进行如下过滤:

Then filter with Rest API like this:

http://sp/_api/web/lists/getbytitle('external')/items?

http://sp/_api/web/lists/getbytitle('external')/items?


filter =修改的gt datetime'2018-05-01T00:15:11Z '
filter= Modified gt datetime'2018-05-01T00:15:11Z'

谢谢

最好的问候


这篇关于无法根据日期和日期过滤SharePoint外部列表时间戳记.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆