CAML Query to Sort list items based on Modified date

datetime, sharepoint, sorting

Solution

For OrderBy CAML section should work fine the example below without Type and IncludeTimeValue attributes

<OrderBy>
   <FieldRef Name='Modified' Ascending='False'/>
</OrderBy>

link

Problem

how can we sort sharepoint list items based on datetime field, i need sort to be done up to milliseconds level. curruntly i am using CAML Query as follows `<OrderBy><FieldRef Name='Modified' Type='DateTime' IncludeTimeValue='TRUE' Ascending='False'/></OrderBy>`

Original source