For backward compatibility, the ddwrt:DateTime function is available. However, it can produce inconsistent results if it is used inside the XSLTListViewWebPart Web Part.
For example, a user might add the following markup inside XSLTListViewWebPart:
<xsl:value-of select="ddwrt:FormatDate(string($thisNode/@*[name()=current()/@Name]),1033,3)" />
After you install this update, you must set the EnableOriginalValue property to True. The default value is False.
Note This setting slows down the rendering of the view because the server will have additional processing responsibilities. After the EnableOriginalValue property is set to True, you must change the XSLT to include the .ISO8601. To do this, use the following code:
<xsl:value-of select="ddwrt:FormatDate(string($thisNode/@*[name()= concat(current()/@Name, '.ISO8601')]),1033, 3)" />
- Use the native functionality that is built into the XSLTListViewWebPart Web Part. The Web Part respects the locale configurations in the site, and presents the data accurately. however, it will not have the formatting offered by the ddwrt:DateTime function.
- Create a calculated column that uses a formula that resembles the following:
=TEXT(date,"dddd")&", "&TEXT(date,"mmmm")&" "&TEXT(date,"dd")&" "&TEXT(date,"yyyy")
- Use the DataFormWebPart Web Part together with the UseServerDataFormat property set to False on the <SPDataSource> tag.
For more information about the UseServerDataFormat property, go to the following MSDN article: UseServerDataFormat property is set to False, the DataFormWebPart Web Part receives the date/time information in UTC format. Therefore, the ddwrt:FormatDate function work correctly.