It took me a while to figure out how to get documents from Lotus Notes views with date keys, so here's a bit of code that may help someone else someday.
Update: the date range does not work for me. It seems to work for a span of a few days, if there are only documents from one particular day, but if there are documents from more than one day, it only returns one group of documents from one day. YMMV :-(
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");
# Date format is according to your regional setting
my $start_date = "03/28/07";
my $StartDate = $Notes->CreateDateTime($start_date);
#my $date_range = "03/01/07 - 03/31/07";
#my $DateRange = $Notes->CreateDateRange();
#$DateRange->{Text} = $date_range;
# Use $StartDate or $DateRange here
my $Entries = $View->GetAllEntriesByKey($StartDate);
my $Entry = $Entries->GetFirstEntry();
print "Documents with Start Date $start_date\n";
while ($Entry) {
my $doc = $Entry->Document();
my $subj = $doc->GetFirstItem('Subject')->{Text};
print "Subject: $subject\n";
$Entry = $Entries->GetNextEntry($Entry);
}