Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers 2

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

share|improve this answer
    
Yes, that was my first thought also. But no, regional settings are correct. –  Larsi Apr 5 '11 at 9:48
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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