RDCOMClient + Outlook email search using date in R

独自空忆成欢 提交于 2019-12-11 16:11:17

问题


I am trying to search emails in the mail using RDCOM client in r.

i am not able to search the mails using date as filter.

I am getting all the mails present in my inbox when i use the code below

library(RDCOMClient)

outlook_app <- COMCreate("Outlook.Application")
search<-outlook_app$AdvancedSearch("Inbox","urn:schemas:mailheader:date = '2018-08-22 00:14:10 IST'")
results <- search$Results()
results$Count()

I tried searching for any good documentation on how to do it but i could not find any resource.

Can Anyone help me with this?


回答1:


You should never use "=" when working with dates: you can never get an exact match because of the round-off errors. Always use a range (prop > date1) and (prop < date2).



来源:https://stackoverflow.com/questions/51964208/rdcomclient-outlook-email-search-using-date-in-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!