Quantcast
Channel: Formatting date in xslt - Stack Overflow
Browsing all 5 articles
Browse latest View live

Answer by hr_117 for Formatting date in xslt

I think format-number will do the trick.<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="xml" indent="yes" /><xsl:variable name="date"...

View Article


Answer by MiMo for Formatting date in xslt

You can use a combination of substring-after and substring-before to extract the pieces, and then handle them as numbers instead than strings - i.e. uses multiplications and additions to generate the...

View Article

Answer by Eero Helenius for Formatting date in xslt

I'm sure there's a more elegant way of doing this even with XSLT 1.0, but this rather brutish solution is one option:Stylesheet<xsl:stylesheet version="1.0"...

View Article

Answer by Anand Vyas for Formatting date in xslt

Try this:<xsl:value-of select="concat(substring(date, 7, 4), '-', substring(date, 4, 2), '-', substring(date, 1, 2))"/>

View Article

Formatting date in xslt

I'm trying to format a certain date format in xslt. This is the format:2012-7-19I'd like to convert this to a numerical value in xslt for sorting, so that the above would become:20120719The problem is...

View Article

Browsing all 5 articles
Browse latest View live




<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>