bluish
bluish

Reputation: 27292

Get documents between a range of dates in IBM Notes

I'm going crazy with all possible query syntaxes used on IBM Notes (old Lotus) databases for searching documents.

I just need all documents (i.e. emails) created (or delivered, which seems to be the same) between a given range of dates, using lotus.domino.Database.search(query) method in Java package for IBM Notes. Consider that I already know the dates format in my system ("dd/MM/yyyy").

Which should be the query?

Upvotes: 0

Views: 2007

Answers (1)

Tode
Tode

Reputation: 12060

First of all: To find out about the syntax just create a view in Domino Designer or check the views that are there (e.g. in your own mail database) and check the "Selection"- formula. Then remove the "SELECT" statement in front of it and use that as query.

Your query would be quite simple:

Form = "Memo" : "Reply" & @Date(@Created) >= [2018/01/01] & @Date(@Created) <= [2018/05/04]

if you are not sure, which date format your server uses, then just use this query instead:

Form = "Memo" : "Reply" & 
@Date(@Created) >= @Date( 2018 ; 1 ; 1 ) & 
@Date(@Created) <= @Date( 2018 ; 5 ; 4 )

This is the right formula for all mail- types. If you need alle calendar- type- documents, then use Form = "Appointment" : "Notice".

As a rule of thumb: Just go to the items- tab in the properties of any document you want to return and examine all items in the left hand site. Then simply use the item name in your formula as variable (except Body: That one would need special treatment).

Upvotes: 3

Related Questions