Re: [xsl] date format to dd-mm-yy from ccyymmdd

Subject: Re: [xsl] date format to dd-mm-yy from ccyymmdd
From: Jiri Jirat <Jiri.Jirat@xxxxxxxxx>
Date: Fri, 05 Jan 2001 09:07:57 +0100
Hello,
 look at this code:


XSL:
=======
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                version="1.0">


<xsl:template match="/Stages/Stage">
 <xsl:value-of select="substring(@startDate,3,2)"/>
 <xsl:text>-</xsl:text>
 <xsl:value-of select="substring(@startDate,5,2)"/>
 <xsl:text>-</xsl:text>
 <xsl:value-of select="substring(@startDate,7,2)"/>
</xsl:template>

</xsl:stylesheet>


Output:
=========
<?xml version="1.0" encoding="utf-8"?>
 00-05-02


Best regards
Jirka





Tariq James Fayaz wrote:
> 
> help i urgently need to convert iso-8601 ccyymmdd into dd-mm-yy output with
> my xsl stylesheet.
> 
> in my xml i have
> 
> <Stages>
> <Stage number="1" name="First" startDate="20000502" endDate=""
> type="Knockout" days="1" limitedOvers="Yes"/>
> ...
> </Stages>
> 
> i am a total xml beginner and would be very greatful for any help!
> 
> Tariq Fayaz
> "PA" CopyDirect
> IT Specialist
> * -
> * <tariq.fayaz@xxxxxxxxxxxx>
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
 <name firstName="Jirka" surname="Jirat"/>
 <mail>     jiratj@xxxxxxxxx  </mail>
 <support>  http://www.zvon.org </support>
 <zvonMailingList> http://www.zvon.org/index.php?nav_id=4
</zvonMailingList>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread