My xslt list view suddenly broke today, and it seems to be due to some date time formatting I've done (and that I'm unable to spot)

        Today:<xsl:value-of select="$Today"/><br/>
        Formatdate:<xsl:value-of select="ddwrt:FormatDate(string($Today),1044,5)"></xsl:value-of><br/>
        Formatdatetime:<xsl:value-of select="ddwrt:FormatDateTime(ddwrt:FormatDate(string($Today),1044,5),1044,'yyyyMMddHH')"></xsl:value-of><br/>

The result of this transform is:

Formatdate:05.04.2011 11:53

Note the last date, it should be 2011040511 (becouse of the formatting 'yyyyMMddHH') but it outputs as month and date switched.

Any ide what's wrong?

(note, the locale here (norwegian) is not important, if you can figure out to do with 1033, that's fine.)

My goal here is just to get the number 2011040511, so I can use it in hour calculations

Thanks for any help!



2 Answers 2


You say it suddenly broke. Could somebody have flipped the regional settings for your SharePoint site?

  • Yes, that was my first thought also. But no, regional settings are correct.
    – Larsi
    Apr 5, 2011 at 9:48

If your server is hosted on a VMWare, there could be a chance of getting the time changed from your host. This could effect your SharePoint settings too.

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.