Sharepoint Designer - 有没有办法计算工作流程中的日期差异?

发布于 2024-08-15 10:47:17 字数 127 浏览 12 评论 0原文

也许我只是疯了......所以,使用 SPD,我可以将任何时间单位添加到日期并将其放入变量中,但我似乎找不到任何可以让我计算两个日期之间的差异的东西。 “进行计算”只允许我从数值中进行选择。我在这里错过了什么吗?看起来应该是显而易见的事情。

Maybe I'm just crazy... So, with SPD I can add any time unit to a date and put that into a variable, but I can't seem to find anything that will let me calculate the difference between two dates. "Do Calculation" only lets me pick from numeric values. Am I missing something here? Seems like something which should be obvious.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

冰雪梦之恋 2024-08-22 10:47:17

日期比较不能“开箱即用”,但有一些解决方法。

也许这篇文章: 如何在 SharePoint Designer 工作流中执行日期计算并构建动态字符串提供了答案?

这里有一些更多相关信息:修改 SharePoint Designer 工作流中的日期格式< /a>

Date comparison is not available "out of the box", but there are some workarounds.

Maybe this article: How to perform date calculations and construct dynamic strings in a SharePoint Designer workflow provides the answer?

Some more related information here: Modifying Date Formats in SharePoint Designer Workflows

浮生未歇 2024-08-22 10:47:17

您可以使用 SharePoint 列表的函数 DATEDIF 设置列值,然后在工作流中使用它。我确信,会有所帮助外面有人——

You can use the function DATEDIF of SharePoint lists to set a column value and then use it in workflows. I am sure, this will help someone out there -

执妄 2024-08-22 10:47:17

从 SharePoint 2013 开始,您可以使用“查找日期之间的间隔”操作。

查找日期之间的间隔
计算两个日期之间的时间间隔(以分钟、小时或天为单位)并将输出存储在变量中。

https://msdn.microsoft.com/en-us/library/office /jj164026.aspx

As of SharePoint 2013 you can use "Find Interval Between Dates" action.

Find Interval Between Dates
Calculates the time interval in minutes, hours, or days between two dates and stores the output in a variable.

https://msdn.microsoft.com/en-us/library/office/jj164026.aspx

作死小能手 2024-08-22 10:47:17

字符串和日期操作以及计算是 SharePoint Designer 工作流中的一个难题。 Colin 提到的链接很好,但您可能还需要考虑将 C# 或 vb.net 代码直接嵌入到 SharePoint Designer 工作流中(无需 Visual Studio)。

我编写了一个允许您执行此操作的组件,并在以下 URL 上发布了相关博客:

http://www.muhimbi.com/blog/2009/12/embed-c-or-vb-code-directly-in.html

String and date manipulation as well as calculations are a pain in SharePoint Designer workflows. The links Colin mentioned are good, but you may also want to consider embedding C# or vb.net code directly into your SharePoint Designer Workflow (Without the need for Visual Studio).

I wrote a component that allows you to do this and blogged about it at the following URL:

http://www.muhimbi.com/blog/2009/12/embed-c-or-vb-code-directly-in.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文