views:

120

answers:

1

This may not be a real XSLT question but more of an Umbraco question.

This function as written will output another format as expexted:

<xsl:value-of select="umbraco.library:FormatDateTime(data [@alias = 'kursusgangTilmeldingsfrist'], 'dd/MM/yyyy')"/>

When called with these three "second arguments" on the current date

'dd MM yyyy'
'dd-MM-yyyy'
'dd/MM/yyyy'

Then output will be:

10 02 2009
10-02-2009
10-02-2009 (and this should have been with "/" and not a "-")

Br. Anders

+1  A: 

Solution is to escape using a backslash so function is called like this:

<xsl:value-of select="umbraco.library:FormatDateTime(data [@alias = 'kursusgangTilmeldingsfrist'], 'dd\/MM\/yyyy')"/>

And this will output correct date as:

10/02/2009
Tillebeck