This code will convert the date to an integer suitable for use with Perl. I believe I originally grabbed it from http://public.activestate.com/authors/tobyeverett/usefulprogs/lastlogin/lastlogin.html.
sub datestr2localtime { my($datestr) = @_; my $temp = Win32::OLE::Variant->new(VT_BSTR, $datestr); $temp->ChangeType(VT_DATE); $temp->ChangeType(VT_R8); return timelocal((gmtime(int(($temp - 25569)*86400+0.5)))[0..5]); } Peter Guzis Web Administrator, Sr. ENCAD, Inc. - A Kodak Company email: [EMAIL PROTECTED] www.encad.com -----Original Message----- From: Tony White [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 8:57 AM To: [EMAIL PROTECTED] Subject: How do I convert date/time stamp from Outlook COM objects? I'm trying to access and delete mail items from a particular Public Folder if they are over 2 weeks old. I need to be able to work with dates that I retrieve from mail messages. I'm using Win32::OLE and the Outlook COM object in order to retrieve this information, but have no clue as to how to manipulate the dates. Can anyone help? TIA Tony White _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs