I have a CQWP in which I am querying the data from a document library. ItemStyle being used is "Title and Description" Title displays the title of the Document and the in Description I have given a site column name DateTime which is of type Date and Time.

The output shows following web part : enter image description here

In the description I want to make the date format DD:MM:YYYY.

How is it possible? Please help

1 Answer 1


You'll need to use an additional XSL schema called ddwrt.

Here is a blog with a good and simple walk-through

<xsl:value-of select="@ArticleStartDate"/>
You get back a pretty nasty
looking result 2009-03-23 00:00:00

However if you use the “FormatDate” function, you can make this look a lot better.
<xsl:value-of select="ddwrt:FormatDate(@ArticleStartDate, 2057, 3)"/>
Results in this 23 March 2009

  • Thanks a lot sir, I need still one suggestion, will there be any difference to apply this xsl to SP-2013?
    – users1100
    Sep 11, 2013 at 8:57
  • 1
    @users1100 No not at all. It's the some in all versions of SharePoint
    – user2536
    Sep 11, 2013 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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