开发者

sort by date in caml query

I want to sort my list items by date:

I m using

<OrderBy><FieldRef Name='SortDate' Ascending='True'/></Order By>

but its giving me results randomly.Is it possible to sort by date in CAML if not then if there is any other way to retrie开发者_Python百科ve list items sorted on the basis of date....


Yes you can sort by date using CAML. To test it out try sorting on the Modified field to see if that gets you better results. Is your SortDate field an actual DateTime field, or is it something else like a string?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜