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
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