This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
format-number
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] format-number
- From: "Daniel Newman" <daniel dot newman at bis-web dot com>
- Date: Wed, 18 Jul 2001 10:02:19 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
This is probably quite a simple question, but I have a number (17042000)
which I want to convert into a date. I've tried format-number(17042000,
'##/##/####'), but that doesn't work, and returns 17042000//, so, how would
I go about converting the above number into something that resembled a date?
And also, I'd like to perform a test on a number to determine if it's
positive or negative. Sgn usually does the trick, but can't see any
reference to it in xsl. What I'd like is to use:
<xsl:choose>
<xsl:when test="sgn($balanace)">
make it green if positive
</xsl:when>
<xsl:otherwise>
make it red if negative
</xsl:otherwise>
</xsl:choose>
Any ideas?
Daniel.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list