日期查询让我发疯,请帮助... [英] Date Query drives me crazy, please help...

查看:84
本文介绍了日期查询让我发疯,请帮助...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,
我正在尝试使用提供的示例(包括日期作为限制)查询WDS.我不太熟悉SQL,经过2个多小时的反复试验,我放弃了.
她是基本代码,看起来很简单,但是我无法使它正常工作:

Hello,
I am trying to query the WDS using the provided examples, including a date as limit. I am not really familiar with SQL, and after over 2 hours of trial and error I give up.
Her is the basic code, seems simple, but I cant get it to work:

var command2 = new OleDbCommand("SELECT \"System.ItemPathDisplay\" FROM \"SystemIndex\" WHERE  Contains(System.FileName, 'test') AND \"System.DateCreated\" < '20090101'", conn);

var command = new OleDbCommand("SELECT \"System.ItemPathDisplay\" FROM \"SystemIndex\" WHERE Contains(System.FileName, 'container')", conn);


如果有人知道答案,请结束我的痛苦...
顺便说一句.
如果您需要更多信息,请问一下,我会立即添加它(为WDS编写此小型"包装器)我已经花了我预期时间10倍的时间:-)

托马斯

PS:还有一件事,对于德国用户,无法在此论坛上发帖.我会说这是主页上的错误.如果您的语言设置为德语,并且您点击了新帖子",该论坛不再处于选中状态,并且无法在可用论坛列表中进行选择(因为该列表非常聪明,可以过滤掉英语论坛).解决方法是将浏览器语言切换为英语.只需将其转发给客户建议"即可....


Please, if anybody knows the answer, end my misery...
Btw. it would be really nice to know how to query for date limits including seconds, or even milliseconds.
If you need any more information, just ask, I will add it promptly (writing this "small" wrapper for the WDS took me already 10x the time I expected :-)

Thomas

PS: One more thing, for german users it is not possible to post in this forum. I would say it is a bug on the homepage. If your language is set to german, and you click "new post" the forum is no longer selected, and can't be selected in the list of available forums (because the list is so intelligent to filter out the english forums). The workaround was switching the browser language to english. Just forward it to "customer suggestions"....

推荐答案

执行以下操作:
"从systemindex中选择system.itempathdisplay,其中contains(System. FileName,"test")和System.DateCreated< '2009/10/01 2:20:35 AM'''"

请参阅此处格式:
Do this:
"select system.itempathdisplay from systemindex where contains(System.FileName, 'test') AND System.DateCreated < '2009/10/01 2:20:35 AM'"

See format here:
http://msdn.microsoft.com/en-us/library/bb231290(VS.85).aspx


这篇关于日期查询让我发疯,请帮助...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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