我正在尝试以编程方式从outlook获取邮件,其中接收时间大于某个特定时间,例如:
oItems.Restrict("[ReceivedTime] > " + receivedTime.ToString("yyyy-MM-dd HH:mm:ss"));"receivedTime“是传递给函数的时间。但它会产生错误。你知道怎么做吗?
发布于 2011-10-20 01:37:12
值两边缺少单引号,应该是
oItems.Restrict("[ReceivedTime] > '" + receivedTime.ToString("yyyy-MM-dd HH:mm:ss") + "'"); 来源:http://msdn.microsoft.com/en-us/library/aa210275(v=office.11).aspx
https://stackoverflow.com/questions/7765587
复制相似问题