Hi,
I have some date time in xml file:
where I need to convert ActualStratTime to seconds in xsl:
I use date:seconds function to convert the ActualStartTime . It works in the first item when I write '2009-02-27T15:34:01'´as input for the function. However, it does not works anymore when I try to get data from item ./ActualStartTime from the first xml file. I got an error: "Microsoft JScript runtime error Wrong number of arguments or invalid property assignment line = 953, col = 3 (line is offset...
". It seems that it can not get the input.
Could someone help?
Regards
maxin
I have some date time in xml file:
Code:
<?xml version="1.0"?> <ProductionPerformance> <ActualStartTime>2008-12-07T01:00:00</ActualStartTime> <ActualEndTime>2008-12-09T01:00:00</ActualEndTime> </ProductionPerformance>
Code:
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" extension-element-prefixes="date"> <xsl:include href="date/functions/date-time/date.msxsl.xsl"/> <xsl:template match="/ProductionPerformance"> <item> <xsl:variable name="mydatetime" select="'2009-02-27T15:34:01'"/> <xsl:value-of select="date:seconds($mydatetime)"/> </item> <item> <xsl:value-of select="./ActualStartTime"/> </item> <item> <xsl:variable name="myseconds" select="./ActualStartTime"/> <xsl:value-of select="date:seconds($myseconds)"/> </item> </xsl:template> </xsl:stylesheet>
". It seems that it can not get the input.
Could someone help?
Regards
maxin
Comment