XSQL date and currency formatting
Hi,
The output from the following code works just fine but I was wondering how I would go about formatting the date to DD,MM,YYYY and the output of fine to a currency format (eg 26 becomes 26.00). The current output of both values look like this:
11/21/2005 0:0:0
874.5
My code is as follows:
XSQL Page:
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="a.xsl"?>
<page xmlns:xsql="urn:oracle-xsql" connection="myconnection">
<xsql:query>
SELECT m.Surname Member, b.Title Book, l.Loaned_Date + t.Loan_Length Due_Date, decode (fine_cost_sf(l.Loaned_Date, t.Loan_Length, t.Fine_Per_Day), 0, 'NONE',
fine_cost_sf(l.Loaned_Date, t.Loan_Length, t.Fine_Per_Day)) Fine
FROM Loan_Type t, Book b, Copy c, Member m, Loan l
WHERE m.Member_ID = l.Member_ID
AND l.type_ID = t.type_ID
AND l.copy_Id = c.copy_ID
AND c.ISBN = b.ISBN
AND l.Returned = 0
ORDER BY m.Member_ID
</xsql:query>
</page>
XSLT Page:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="page">
<html>
<head>
<link rel="stylesheet" type="text/css" href="global.css"/>
</head>
<body>
<table>
<tr>
<th>Member</th><th>Book</th><th>Due Date</th><th>Fine (#163;)</th>
</tr>
<xsl:apply-templates select="ROWSET/ROW"/>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="ROW">
<tr>
<td>
<xsl:value-of select="MEMBER"/>
</td>
<td>
<xsl:value-of select="BOOK"/>
</td>
<td>
<xsl:value-of select="DUE_DATE"/>
</td>
<td>
<xsl:value-of select="FINE"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
Any help would be most grateful. Thank you for your time
|