我无法让这个简单的SPQuery工作。它不会返回任何项目。虽然我的文档库有5个项目,修改日期为22/08/2013 12:46
请帮助我,我在哪里弄错了?
string SPquery = @"<Where><Geq><FieldRef Name='Modified'/><Value Type='DateTime'>22/08/2013</Value></Geq></Where>";
SPQuery oQuery = new SPQuery();
oQuery.ViewAttributes = "Scope=\"Recursive\"";
oQuery.Query = SPquery;
var query = documentLibraryAsList.GetItems(oQuery);
foreach (SPListItem spListIem in query)
{
string s = "Sure";
}
答案 0 :(得分:0)
似乎您使用了错误的DateTime格式,它应该是yyyy-MM-dd。试试那个
string SPquery = @"<Where><Geq><FieldRef Name='Modified'/><Value Type='DateTime'>2013-08-22</Value></Geq></Where>";