使用公式和lotusscript获取最近25分钟的文档

YdB*_*YdB 2 lotus-notes lotusscript formula lotus-domino

在莲花我有一个订单文件的视图.我正在构建一个代理来搜索在过去25分钟内修改的所有订单.

为此我做了以下代码:

strFormule = "Form=""Order"" & @Modified >=  @Adjust(@Today;0;0;0;0;-25;0) & Deleted !=""J"""

Set ndcOrder = currentDB.Search( strFormule, Nothing, 0 )
If ndcOrder.Count <> 0 Then
Set doc = ndcOrder.GetFirstDocument
While Not doc Is Nothing
Run Code Online (Sandbox Code Playgroud)

因此,如果它是11.00那么它需要接受今天从10.35修改的订单

但是在调试器中我也得到了2小时前修改过的订单.

这怎么可能?

use*_*054 6

我想这可能是因为你正在使用没有时间元素的@today.试试@Now吧?

  • @bboni 在幕后,Lotus Notes 将特定日期/时间存储为数字,而在后台,@Today = @Integer(@Now),今天中午是@Today + 0.5。(不要在公式语言中尝试,它不会工作,但是如果您愿意,可以在 LotusScript 中使用它。)@今天是今天早上的午夜。因此,`@Adjust(@Today;0;0;0;0;-25;0)` 将始终是前一天晚上 11:35,无论您什么时候做。 (2认同)