I have a list with a calculated column which adds 5 days to the Created date. The date calculates correctly on the list but when displayed via XSLT it subtracts 1 day. I have found many different solutions for this problem but have but unsuccessful in implementing the fixes to my XSLT file.

<xsl:template match="Item">
  <tr class="item">
    <td><xsl:value-of select="dateCalc" /></td>

The research I've done so far implies the issue is due to our server being in Canada using dates as dd/mm/yyyy. One fix I found online is: XsltListViewWebPart and ddwrt:DateTime limitations

<xsl:value-of select="ddwrt:FormatDate(string($thisNode/@*[name()= concat(current()/@Name, '.ISO8601')]),1033, 3)" />

I cannot figure out how to reference by column name on this. Every time I replace @Name for dateCalc I get an error:

"Error trying to generate response. Verify your xslt."

  • Could it be a matter of not only what the server's date format is, but of it being in a different time zone and it adding/subtracting just enough to push it to the next day?
    – Graham
    May 13, 2015 at 20:10
  • I would not imagine so. The server is in Quebec and I am in Eastern Ontario. Same time zone.
    – Martin
    May 13, 2015 at 21:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.