Jump to content

date convert


Guest gipo

Recommended Posts

In XSLT 2.0, there's the format-dateTime() function which does EXACTLY what you're asking for. It converts a string of the schema dateTime datatype (as this one is) to whatever date-time format you might want. In XSLT 1.0, there's EXSLT format-date() function, however your XSLT processor must support it. You can use the function-available() function to test whether or not your processor supports it.If it's not supported, doing it "manually"... it's just not worth it. Instead, download the zip file on the EXSLT page above and call the date.format-date.template.xsl file into your stylesheet. Then you can use the <xsl:call-template/> call explained on the page.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...