3

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:

Today:2011-04-05T09:53:03Z
Formatdate:05.04.2011 11:53
Formatdatetime:2011050411

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!

Regards

Larsi

1

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 '11 at 9:48
0

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, privacy policy and cookie policy

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