范围之间的自定义列匹配日期

发布于 2025-02-13 10:49:26 字数 272 浏览 0 评论 0原文

我想知道是否可以创建一个自定义列以匹配适合特定日期范围之间的日期。我尝试使用以下自定义公式,但似乎没有返回任何内容,

=if [#"Start Date (Calculated 2)"] <= #date(2019,09,01) and [#"Start Date (Calculated 2)"] < #date(2022,04,01) then "Yes" else [#"Start Date (Calculated 2)"]

但是它不匹配任何内容

I'm wondering if it's possible to create a custom column to match dates that fit between specific date ranges. I've tried using the below custom formula but doesn't seem to return anything

=if [#"Start Date (Calculated 2)"] <= #date(2019,09,01) and [#"Start Date (Calculated 2)"] < #date(2022,04,01) then "Yes" else [#"Start Date (Calculated 2)"]

However it doesn't match anything

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

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

发布评论

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

评论(1

无可置疑 2025-02-20 10:49:26

机械上,如果您的列是日期,则您的公式可以正常工作,除了逻辑毫无意义,

您正在寻找日期&lt; 01Sep2019 and &lt; 01apr2022

您可能想将其更改为此,以取代它第一&lt;与&gt;

=if [#"Start Date (Calculated 2)"] >= #date(2019,09,01) and [#"Start Date (Calculated 2)"] < #date(2022,04,01) then "Yes" else [#"Start Date (Calculated 2)"]

Mechanically, if your column is a date, your formula works fine except the logic makes no sense

You are looking for a date <01Sep2019 and <01Apr2022

You probably want to change it to this, replacing the first < with >

=if [#"Start Date (Calculated 2)"] >= #date(2019,09,01) and [#"Start Date (Calculated 2)"] < #date(2022,04,01) then "Yes" else [#"Start Date (Calculated 2)"]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文