使用R中的日期进行RDCOMClient + Outlook电子邮件搜索 [英] RDCOMClient + Outlook email search using date in R
本文介绍了使用R中的日期进行RDCOMClient + Outlook电子邮件搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用r中的RDCOM客户端搜索邮件中的电子邮件.
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.
有人可以帮我吗?
推荐答案
在处理日期时,切勿使用"=":由于舍入错误,您永远无法获得完全匹配的结果.始终使用范围(prop> date1)和(prop< date2).
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).
这篇关于使用R中的日期进行RDCOMClient + Outlook电子邮件搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文