user2472368
user2472368

Reputation: 199

Comparing dates in Lotus Notes search formulas

In the code below I'm trying to find all the documents in which the date in the field duration is before the today's date

Set no = db.Search("Form=""formname"" & state=""3"" & duration<Today()", time, 0)

The field duration is of Date/Time type.

Upvotes: 0

Views: 1700

Answers (1)

Richard Schwartz
Richard Schwartz

Reputation: 14628

The first argument of NotesDatabase.Search must be a Notes formula language string. Functions in formula language start with the @ symbol, like this:

Set no = db.Search("Form=""formname"" & state=""3"" & duration<@Today", time, 0)

Upvotes: 1

Related Questions