Hello,
format-date formats a date into the date format of your choice.
see here :
http://www.w3.org/2005/xpath-functions/[
^]
and there:
http://www.w3.org/TR/xmlschema-2/#date[
^]
Many parser will demand that the date you want to transform has a format like 2002-10-09T11:00:00, so 08-DEC-1968 will not be recognised.
A way to solve this is do it yourself and not use date-format, for example:
="1.0"
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="*">
<xsl:value-of select="substring(customerDOB,8,4)" />
<xsl:variable name="month" select="substring(customerDOB,4,3)" />
<xsl:choose>
<xsl:when test="$month = 'JAN'">-01-</xsl:when>
<xsl:when test="$month = 'FEB'">-02-</xsl:when>
<xsl:when test="$month = 'MAR'">-03-</xsl:when>
<xsl:when test="$month = 'APR'">-04-</xsl:when>
<xsl:when test="$month = 'MAY'">-05-</xsl:when>
<xsl:when test="$month = 'JUN'">-06-</xsl:when>
<xsl:when test="$month = 'JUL'">-07-</xsl:when>
<xsl:when test="$month = 'AUG'">-08-</xsl:when>
<xsl:when test="$month = 'SEP'">-09-</xsl:when>
<xsl:when test="$month = 'OCT'">-10-</xsl:when>
<xsl:when test="$month = 'NOV'">-11-</xsl:when>
<xsl:when test="$month = 'DEC'">-12-</xsl:when>
</xsl:choose>
<xsl:value-of select="substring(customerDOB,1,2)" />
</xsl:template>
</xsl:stylesheet>
Hope it helps.
Valery.