1

I am having some problems sorting a content query web part by date.

I have referenced the post below and added the below property to the webpart, but it doesn't seem to be having any affect.

<property name="QueryOverride" type="string"><![CDATA[<OrderBy><FieldRef Name="Created" Nullable="True" Type="DateTime" Ascending="True"/></OrderBy>]]></property>

This could be from what Mohamed Hachem mentioned in the post below:

Note: sorting works only when type is Text not Number and not even DateTime, you can sort both number as Text and for the DateTime the trick is to convert it to calculated value and sort it as text.

If I need to convert the field to a calculated value and then sort, how is this achieved?

http://social.msdn.microsoft.com/Forums/sharepoint/en-US/34e101b1-7f7d-4c79-b6c5-25890881195a/changing-the-sort-order-in-a-list-inside-a-content-query-web-part?forum=sharepointcustomizationlegacy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.