如何在sharepoint中获取文档的最后修改时间? [英] How to get last modified time of a document in sharepoint?

查看:54
本文介绍了如何在sharepoint中获取文档的最后修改时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何转换 MssCrawlUrl 表的 LastModifiedTime 值?

How to convert LastModifiedTime value of MssCrawlUrl table ?

我尝试了以下查询,

Select CAST(LastModifiedTime as datetime)
From MssCrawlUrl Where DisplayURL like '<DisplayURL>'

但它给出了错误

'将表达式转换为数据类型日期时间时出现算术溢出错误.'

'Arithmetic overflow error converting expression to data type datetime.'

推荐答案

不支持直接查询 SharePoint 数据库.您必须使用 API.除了官方不支持"的原因外,它可能会导致锁定、返回错误数据,并且自定义查询可能会在服务包或产品版本之间中断.请参阅 Mike Fitz 的帖子 请远离数据库! 从他在微软的时间开始.

It is not supported to query the SharePoint databases directly. You must use the API. Apart from the official "not supported" reason, it can cause locking, return incorrect data, and custom queries may break between service packs or product versions. See Mike Fitz's post Please Stay Out Of The Database! from his time at Microsoft.

请参阅此可视化操作方法,了解如何操作的示例使用支持的 API.另请参阅 MSDN 上的这些文章 和此 最佳实践 文章以了解更多信息.

See this Visual How To for an example of how to use the supported API. Also see these articles on MSDN and this best practices article for further information.

这篇关于如何在sharepoint中获取文档的最后修改时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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