Select the product you need help with
XsltListViewWebPart and ddwrt:DateTime limitationsArticle ID: 2580994 - View products that this article applies to. SymptomsIn Microsoft SharePoint Foundation and Microsoft SharePoint Server, the primary view technology is the XSLTListViewWebPart. Users can customize the XSLT by using Microsoft SharePoint Designer. 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: CauseThis problem occurs because the ddwrt:FormatDate function expects the data format to be UTC, but XSLTListViewWebPart instead returns the date as preformatted to the web locale or to the locale date and time. ResolutionTo resolve this problem, use the new EnableOriginalValue property that was added to the XlstListViewWebPart Web Part that unblocks this scenario. The previous workarounds are still valid until the February 2012 Cumulative Update is installed. For more information about the update, click the following article number to go to the article in the Microsoft Knowledge Base: 2597132
(http://support.microsoft.com/kb/2597132/
)
Description of the SharePoint Foundation 2010 cumulative update package (SharePoint Foundation server-package): March 7, 2012After 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: WorkaroundTo work around this problem, you can use any of the following methods if you have not yet installed Cumulative Update 2597132
(http://support.microsoft.com/kb/2597132/
)
.
For more information about the UseServerDataFormat property, go to the following MSDN article: SPDataSource.UseServerDataFormat property When the 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.
(http://msdn.microsoft.com/en-us/library/ff412418.aspx)
Properties | Article Translations
|


Back to the top








