开发者

sort by date in caml query

开发者 https://www.devze.com 2022-12-25 08:38 出处:网络
I want to sort my list items by date: I m using <OrderBy><FieldRef Name=\'SortDate\' Ascending=\'True\'/></Order By>

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

精彩评论

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

关注公众号