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?
精彩评论