Skip to content

Customize the Date Time in a Content Query Web Part in SharePoint 2010

by on August 5, 2011

Using SharePoint Designer, add this to the xsl stylesheet section of your item styles xsl sheet in the style library.


Use the code below in the item (preferably a new one so you don’t mess up the original).

<xsl:value-of select="ddwrt:FormatDate(string(@ArticleStartDate),1033,3)"/>

Select the item style on the CQWP you would like to use it and voila! Custom DateTime!

  1. <xsl:value-of select="ddwrt:FormatDateTime(@DateDescription, 1033, 'd MMM yyyy')" />

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: