AlertThis post is over a year old, some of this information may be out of date.
Bug With SharePoint 2010 XSLT DateFormat Function
Yesterday I found out that there is a problem/bug using the XSLT ddwrt:DateFormat function. The problem/bug occurs when the regional settings is not set to English (United States).
When a day got the value between 1 and 12, the ddwrt:DateFormat function will recognize this as the month. The month value will be used as the day.
So if the day value is less than 13, you get the following problem:
I did not notice it in the beginning, because my settings are always set to English (United States) on my development server. When I implemented the XSLT stylesheet on a different environment, where the regional settings were set to **Dutch (Belgium)**, some of dates were incorrectly formatted.
English (United States)
Dutch (Belgium)
Solution
After some research and testing without result, I did some googling and found a post from someone who had the same problem. The blog post can be found here. In this blog post he included a custom XSL template to format the date.
I have created my own version of his XSL template to format the date in Dutch date format.