I am showing the custom date in my Web Part but it showing one Day added to date. The current date field is DateTime Format, so I am showing only date it work but it showing one day added to date.

This is my Code :

< xsl:value-of select="ddwrt:FormatDateTime(@ActivityDate, 1033, 'MM/dd/yyyy')" />

It showing one day added date.

  • are you checked the regional language setting at your site setting, check the time zone and the selected calendar Commented Oct 14, 2016 at 10:45
  • Yes i checked and also select the calendar.
    – John D
    Commented Oct 14, 2016 at 10:49

1 Answer 1


Try to check Site Settings : Regional Settings , make sure that you are selected the correct time zone also check calendar type, where there's some calendar like Hijri calendar can add one day or subtract one day.

If everything is okay, try to do the following :

<xsl:variable name="date" select="ddwrt:FormatDateTimeUsingCurrentContext(string(@ActivityDate))"/>
<xsl:value-of select="ddwrt:FormatDateTime($date, 1033, 'MM/dd/yyyy')" />

where FormatDateTimeUsingCurrentContext format @ActivityDate based on your current SharePoint context settings .


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.