SharePoint – CQWP – XSLT in ItemStyle to Format Created Date

The goal is to display the created date with the full month and day:

Add the following namespace attribute to the root xsl:stylesheet element in ItemStyle:

xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"

Create an xsl:variable element:

<xsl:variable name="Created">
<xsl:value-of select="ddwrt:FormatDateTime(string(@Created) ,1033 ,'MMMM dd')" />
</xsl:variable>

Use the variable:

<xsl:value-of select="$Created"/>
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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