|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: date format to dd-mm-yy from ccyymmdd
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








