Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Parsing Outlook email time sent?

by dyan (Novice)
on Sep 29, 2007 at 01:03 UTC ( #641651=perlquestion: print w/ replies, xml ) Need Help??
dyan has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to figure out how to grab the email timestamp from an Outlook email. Anyone happen to know how to do this? Here's a snippet of my code:
use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Outlook'; ... $namespace = ... $Folder1 = ... ... $Folder4 = ... ... foreach $item (in $Folder4->{Items}){ $date = $item->{CreationTime}->Date('ddd MMM dd, yyyy').' '.$item ->{C +reationTime}->Time('hh:mm:ss tt'); print $date . "\n"; }
That of course only gives me the creation time of the e-mail, which is not what I want. I'm not too sure on how to get the time that the email was sent. As you can tell, I'm pretty new at this, so please let me know if I'm way off track. Your help is appreciated. Thanks.
EDIT: After looking up the appropriate documentation on MSDN, I found out I +should be using ReceivedTime. Well, that was simple.

Comment on Parsing Outlook email time sent?
Select or Download Code
Replies are listed 'Best First'.
Re: Parsing Outlook email time sent?
by sg (Pilgrim) on Sep 29, 2007 at 09:32 UTC
Re: Parsing Outlook email time sent?
by barbie (Deacon) on Sep 30, 2007 at 21:16 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://641651]
Approved by Corion
Front-paged by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2015-11-28 18:34 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls