RE: [xsl] problem converting date format- NOW SOLVED

Subject: RE: [xsl] problem converting date format- NOW SOLVED
From: "Serrell, Rachael" <rachael.serrell@xxxxxxxx>
Date: Tue, 9 Apr 2002 14:50:21 +0100
sorry..worked it out now..did the count wrong!

-----Original Message-----
From: Serrell, Rachael [mailto:rachael.serrell@xxxxxxxx]
Sent: 09 April 2002 14:28
To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] problem converting date format


Hi, I've tried a few of the solutions on the FAQ but still can't get this to work..what am i doing wrong? I'm not too good at params yet and this may be why!

trying to convert :
<eventDateTime>2002-02-02T12:15:44</eventDateTime>

to output  '02-02-2002 12:15:44 GMT'

using:

<eventDateTime>
	    <xsl:call-template name="DateTime">
          	 <xsl:with-param name="date" select="//bem:eventDateTime"/>
           </xsl:call-template>
 </eventDateTime>

<xsl:template name="DateTime">
	<xsl:param name="date"/>
	<xsl:value-of select="substring($date, 7, 2)" />
	<xsl:text>-</xsl:text>
	<xsl:value-of select="substring($date, 5, 2)" />
	<xsl:text>-</xsl:text>
	<xsl:value-of select="substring($date, 3, 2)" />
	<xsl:value-of select="substring($date, 10,2)"/>
	<xsl:text>:</xsl:text>
	<xsl:value-of select="substring($date,12,2)"/>
	<xsl:text>:</xsl:text>
	<xsl:value-of select="substring($date,14)"/>
	<xsl:text> GMT</xsl:text>
</xsl:template>


but I only get the text result and the rest of the stylesheet after this point doesn't process:

<eventDateTime>--:: GMT</eventDateTime>

can anyone help?
many thx

This message is for the named person's use only. It may contain sensitive and private proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. CREDIT SUISSE GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT business units of CREDIT SUISSE FIRST BOSTON reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.
Unless otherwise stated, any pricing information given in this message is indicative only, is subject to change and does not constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as  preliminary only and subject to our formal written confirmation.



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


This message is for the named person's use only. It may contain sensitive and private proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. CREDIT SUISSE GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT business units of CREDIT SUISSE FIRST BOSTON reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.
Unless otherwise stated, any pricing information given in this message is indicative only, is subject to change and does not constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as  preliminary only and subject to our formal written confirmation.



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


Current Thread