WebDAV 日期范围查询

发布于 2024-08-12 03:28:28 字数 1123 浏览 15 评论 0原文

我正在尝试从 Exchange Server 2003 访问并提取消息。我需要按日期获取它们,但我遇到了问题。

这是代码 lsQuery = "" + "" + "SELECT \"urn:schemas:httpmail:hasattachment\", \"DAV:显示名称\", " + "\"urn:schemas:httpmail:from\", \"urn:schemas:httpmail:subject\", " + "\"urn:schemas:httpmail:htmldescription\" FROM \"" + lsRootUri + "\" WHERE \"DAV:ishidden\" = false " + "AND \"DAV:isfolder\" = false " + "AND \"urn:schemas:httpmail:hasattachment\" = true " + "AND \"urn:schemas:httpmail:read\" = false " + "AND \"urn:schemas:httpmail:date \" \">=\" CAST(\"2009/11/17\" as 'dateTime') " + "AND \"urn:schemas:httpmail:date \" \"<=\" CAST(\"2009/11/19\" as 'dateTime') " +“”;

Im trying to access and extract message from Exchange Server 2003. I need to get them by dates but im having problem with it.

Here's the code lsQuery = "<?xml version=\"1.0\"?>"
+ "<D:searchrequest xmlns:D = \"DAV:\" xmlns:m=\"urn:schemas:httpmail:\">"
+ "<D:sql>SELECT \"urn:schemas:httpmail:hasattachment\", \"DAV:displayname\", "
+ "\"urn:schemas:httpmail:from\", \"urn:schemas:httpmail:subject\", "
+ "\"urn:schemas:httpmail:htmldescription\" FROM \"" + lsRootUri
+ "\" WHERE \"DAV:ishidden\" = false "
+ "AND \"DAV:isfolder\" = false "
+ "AND \"urn:schemas:httpmail:hasattachment\" = true "
+ "AND \"urn:schemas:httpmail:read\" = false "
+ "AND \"urn:schemas:httpmail:date \" \">=\" CAST(\"2009/11/17\" as 'dateTime') "
+ "AND \"urn:schemas:httpmail:date \" \"<=\" CAST(\"2009/11/19\" as 'dateTime') "
+ "</D:sql></D:searchrequest>";

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文