I posted Lotus Notes documents by Date keys a while ago, and the date keys worked, and the date ranges seemed to work, but later I found that the ranges worked only if all of the documents were from one particular date. If the date range spanned two or more groups of documents, only documents from one particular date were returned. Can anyone confirm or deny whether date ranges in Lotus Notes (from perl) work? Here is some code, the database/view/field names and the date range would have to be adjusted as appropriate:
use strict; use warnings; use Win32::OLE; my $Notes = Win32::OLE->new('Notes.NotesSession') or die "Cannot start Lotus Notes Session object.\n"; my $Database = $Notes->GetDatabase('server', 'dbfile.nsf'); my $View = $Database->GetView("By Start Date"); my $date_range = "03/01/07 - 03/31/07"; my $DateRange = $Notes->CreateDateRange(); $DateRange->{Text} = $date_range; my $Entries = $View->GetAllEntriesByKey($DateRange); my $Entry = $Entries->GetFirstEntry(); while ($Entry) { my $doc = $Entry->Document(); my $subj = $doc->GetFirstItem('Subject')->{Text}; print "Subject: $subject\n"; $Entry = $Entries->GetNextEntry($Entry); }

In reply to Lotus Notes date ranges not returning all documents by runrig

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.