This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: date format to dd-mm-yy from ccyymmdd
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] date format to dd-mm-yy from ccyymmdd
- From: Jiri Jirat <Jiri dot Jirat at idoox dot com>
- Date: Fri, 05 Jan 2001 09:07:57 +0100
- Organization: IDOOX
- References: <2B8C9B202AA7D311A1470090279A6D0B01B7CC78@lpax.slk.press.net>
- Reply-To: xsl-list at lists dot mulberrytech dot com
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@pa.press.net>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
--
<name firstName="Jirka" surname="Jirat"/>
<mail> jiratj@idoox.com </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