2

I have successfully created a CAML query to sort my list by modified date but I want published date instead. Why does replacing "Modified" with "Published" not work? They are both "Date and Time" columns in the list when I look at List Settings but the published column must have a different name for some reason? (This is in SharePoint 2013)

query.Query = "<OrderBy><FieldRef Name='Modified' Ascending='False'/><Value Type='DateTime' IncludeTimeValue='True'></Value></OrderBy>";
4

The internal name of the field is PublishedDate. Try changing your query to use that name and hopefully that will solve the problem.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.