Date Format Conversion
Hello XML Guru'z,
I need to convert a date format but I'm sort of new to XSL and having trouble figuring this out. I've tried all kinds of date conversion functions but to no avail. :(
I'm receiving the string as <requestDate>20090925</requestDate>
and I need to display it as '09/25/2009'
what is the best approach for this and is there a system function that can do this or does it require a use function?
Thanks for any help!
Just try this XSL by which you can generate your required output i.e. 09/25/2009:
<?xml version="1.0" encoding="UTF-8"?>
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
<xsl:value-of select="concat(substring(.,5,2), '/',substring(.,7,2),'/', substring(.,1,4))"/>