SharePoint 列表计算列比较日期

发布于 2024-11-17 18:24:37 字数 294 浏览 7 评论 0原文

我在 SharePoint 列表中有一个字段,该字段将某人在一列中输入的里程数与当前里程报销率相乘。

最终结果是这样的: =[里程] * 0.51

随着费率现在上涨,我需要增加该值,但仅限于特定日期之后输入的费率。这应该没问题,因为我们捕获了输入日期。但是,我无法让它工作。

做这样的事情: =IF([日期] < "7/1/2011", [里程] * 0.51, [里程] * 0.555)

似乎不起作用,因为第一个方程总是触发。我假设我错过了一些简单的事情,例如将字符串转换为日期,但在搜索后找不到它。

I've got a field in a SharePoint list that multiplies a number of miles someone enters in one column with the current reimbursement rate for mileage.

It ends up like this:
=[Mileage] * 0.51

With the rates now going up I need to increase that, but only for rates entered after a certain date. This should be ok because we capture the entry date. However, I can not get it to work.

Doing something like this:
=IF([Date] < "7/1/2011", [Mileage] * 0.51, [Mileage] * 0.555)

Does not seem to work, as the first equation always triggers. I'm assuming I'm missing something simple like converting the string to a date, but can not find it after searching.

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

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

发布评论

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

评论(1

赏烟花じ飞满天 2024-11-24 18:24:37

您正在寻找的 SharePoint 函数是DATE(年,月,日)

所以这给出了(假设你的原始日期是美国格式,所以 2011 年 7 月 1 日)

=IF([Date] < Date(2011,7,1), [Mileage] * 0.51, [Mileage] * 0.555)

自我推销 - 但这SharePoint 计算列备忘单可能会帮助您,如果您做很多计算列的事情。

The SharePoint function you're looking for is DATE(year,month,day)

So this gives (assuming your orig date was US format so 1st July 2011)

=IF([Date] < Date(2011,7,1), [Mileage] * 0.51, [Mileage] * 0.555)

Self promotion - but this SharePoint Calculated Column Cheat Sheet may help you if you're doing lots of calculated column stuff.

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