收录日期:2021/01/23 05:55:15 时间:2010-03-31 04:28:44 标签:sharepoint

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 retrieve 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?