Content Query Web Part Date Format

Firstly, follow Heather Solomon’s blog on a great how to customise the content query web part. Essentially, you need to allow the webpart to expose itself to whatever information you need it to display.

I had a roll up of information, which ideally I needed the article date to display on the page.


Follow on to the MSDN blog which is found within the above link (

I managed to get what I wanted… but in an American date and time format, which was a big no no for me.

Fortunately, there was a post on the SharePoint User Group forum for UK members.

All you need to do is edit itemstyle.xsl to include xmlns:ddwrt=”  as a reference on the top header and amend the description tag to <xsl:value-of select=”ddwrt:FormatDateTime(string(@Modified) ,1033 ,’d/M/yyyy h:mm tt’) />

You can remove the time, amend the date as you wish.

If you do unfortuantly break your SharePoint site with any mistakes, not to worry, reset to the site definition using SharePoint Designer.

Any questions let me know!


Tags: , ,

One Response to “Content Query Web Part Date Format”

  1. Steve Says:

    Good tip! I was having the opposite problem. My dates were formatting YYYY-MM-DDDD but I changed the format characters and it worked. One note: if you copy/paste the code from this page and it does not work you may have to re-type the quotes. Something about the way they are formatted.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: