browse outlook email - format date

조회 수: 3 (최근 30일)
Arnaud Bitoun
Arnaud Bitoun 2019년 1월 3일
댓글: Arnaud Bitoun 2019년 1월 5일
Hello everybody,
I am writing a code browsing my outlook emails in order to retrieve some information according to their ReceivedTime;
outlook = actxserver('outlook.Application');
mapi = outlook.GetNamespace('mapi');
INBOX = mapi.GetDefaultFolder(6);
count = INBOX.Items.Count;
xDates=zeros(count,1);
for k=1:count
email = INBOX.Items.Item(k);
xDates(k)=datenum(email.ReceivedTime,'dd.mm.yyyy HH:MM:SS');
end
The issue is that email.ReceivedTime gives 〲ㄮ⸲〲㠱〠㨸㐵〺1, the format seems to be not correct and its impossible to use it in Matlab.
However when I read my emails directly in Outlook the received time displays correctly.
Thanks in advance for your help,
Arnaud
  댓글 수: 2
per isakson
per isakson 2019년 1월 5일
On my system (Win10,R2018b,Swedish localization) I get
>> email.ReceivedTime
ans =
'2018-05-29 09:01:11'
Arnaud Bitoun
Arnaud Bitoun 2019년 1월 5일
Yes, you got what expected. In my case (Win 10 Pro,R2016b, Switzerland localization) I get
>> email.ReceivedTime
ans =
〲ㄮ⸲〲㠱〠㨸㐵〺1
I guess it's just a problem of settings. Anyone has ever encountered a similar issue ?
thanks in advance,
Arnaud

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by