c# - String format TimeSpan in xslt 1.0 -
i have xml data contains timespan duration. present duration in number of minutes xslt transformation. use xslt 1.0. have answer ?
data : <rds_tm_timespan>pt1m15.981s</rds_tm_timespan> xslt : <xsl:value-of select="((n:rds_tm_timespan) div 1000) div 60"/>
the result nan
i found solution using script, , without manipulate string.
<ms:script language="c#" implements-prefix="user"> <![cdata[ public string timespanformat(string p_duration){ return xmlconvert.totimespan(p_duration).tostring(@"hh\:mm\:ss"); } ]]> </ms:script>
Comments
Post a Comment