I'm trying to return a formatted date from an Oracle database. I format the date in the query itself using the TO_CHAR() funtion. The problem is, when I use the TO_CHAR() function, JSP is acting like nothing is returned. If I take the function out and just select the column as normal, it outputs but with the full TimeStamp (which I don't want).
I don't know Oracle, but if this was MySQL I'd say you need to assign an identifier to your returned result, something like
<sql:query var="resource_list">TO_CHAR(dob, 'DD-MON-YYY') AS thisDOB
SELECT TO_CHAR(dob, 'DD-MON-YYYY')
FROM ccevs_resource_registry </sql:query>
..and then call it as
<c:out value="${resource_row.thisDOB}" /><c:forEach items="${resource_list.rows}" var="resource_row"> <c:out value="${resource_row.dob}" />
Untested, but FWIW! -- Hassan Schroeder ----------------------------- [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
dream. code.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]