NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Win32::OLE Dates are the days since 1900 (Score:1)
I searched for OLE Date [google.com] and got this link [newobjects.com] which confirmed my suspicion that OLE dates are just like Excel dates, the number of days since 1900. The fractional part is the fraction of a day. Mac Excel is Just Different, and I guess the same will go for all other Mac Office products that use 1904 as epoch.
Re:OLE Dates are the days since just before 1900 (Score:1)
Sounds kinda messy to me.
Re: (Score:2)
It would appear that Excel and Outlook dates are different, as the integer returned is greater than the number of days since 1900. Note that the value returned in this instance is not a float.
Existing code (Score:1)
And it was indeed something very very odd.
Re: (Score:2)
I found the particular set of routines you mentioned, but alas they don't appear to apply to the date values returned by Outlook :( Using your algorithm I get 'Thu Jan 4 12:24:00 2007' +/- up to 2 minutes for every entry during 2004, 2005 and 2006.
There are a few websites where they mention odd handling of the Win32 dates, but none that I've found that mention the algorithms used to convert into any human readable format or even a Unix format :(
Win32::OLE::Variant ? (Score:1)
I had a problem with the lastLogin field of user accounts when querying ADSI with Win32::OLE.
The trick was to use Win32::OLE::Variant:
If
Re: (Score:2)
Excellent. Doesn't work for all values, but works for most. I think I now owe you much beer :)
A new version of Mail::Outlook out soon ;)