use strict; use Win32::OLE; # Open the email database in Lotus Notes my $notes = Win32::OLE->new('Notes.NotesSession') or die "Can't open Lotus Notes"; my $database = $notes->GetDatabase("",""); $database->OpenMail; # Get a list of all of the documents in the Inbox # (Use single-quotes to protect the dollar-sign) my $view = $database->GetView('($Inbox)'); # Get a Notes document my $doc = $view->GetFirstDocument; # The "Created" timestamp is stored as an object # via a property named "Created" my $create_date = $doc->{Created}; # To convert this to a usable date like "09/11/2001", # call the "Date" method on this object my $date = $create_date->Date;