使用R中的日期间隔进行RDCOMClient + Outlook电子邮件搜索 [英] RDCOMClient + Outlook email search using date interval in R

查看:111
本文介绍了使用R中的日期间隔进行RDCOMClient + Outlook电子邮件搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试搜索提供日期作为参数的Outlook邮件.

I am trying to search outlook mail giving date as parameter in search.

现在我正在搜索完整的邮箱,然后根据收到的日期进行过滤,但是问题是这样每次读取所有邮件.我想要一个可以按日期间隔直接搜索的解决方案,这样它将返回介于日期间隔之间的邮件.

right now I am searching full mailbox then filtering on the basis of received date but problem is by this way it is reading all mail each time. I want a solution where I can search directly by date interval so that it will return mails falling in between date interval.

library(RDCOMClient)

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

我尝试了这个,但是对我来说不起作用.我希望所有邮件都在提到的日期之后寄出.

I tried this but it is not working for me. I want all mails came after mentioned date.

推荐答案

不指定时区(IST).您需要的是'2019-05-22 00:14:10'.

Do not specify the time zone (IST). '2019-05-22 00:14:10' is what you need.

这篇关于使用R中的日期间隔进行RDCOMClient + Outlook电子邮件搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆