Hey Keith,

I still have to guess this has indeed something to do with JSTL not
understanding the .dob . Haven't been around SQL much of late so I can't
answer that one. Why not simplify this problem and use a fmt:formatDate tag
instead of doing the formatting in SQL?

Martin

-----Oorspronkelijk bericht-----
Van: Keith [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 31 maart 2004 3:27
Aan: Tag Libraries Users List
Onderwerp: Re: Formatted date not returning


Nope, that didn't work. I don't see the identifiers being used anywhere in
the Oracle
book I have. It didn't throw an error or anything, just did the same thing.
Thanks for
the suggestion, though!
I did notice that I do have formated dates returning in another document,
but the
forEach is using the rowsByIndex instead. The below outputs the TO_CHAR()
formatted date
exactly as I want it. Anyone know why the Indexed list returns the formated
date, but
not the SortedMap?

<c:forEach items="${complete_list.rowsByIndex}" var="row">
        <tr>
                <c:forEach items="${row}" var="column">
                        <td>
                                <c:if test="${empty column}">&nbsp;</c:if>
                                ${column}
                        </td>
                </c:forEach>
        </tr>
</c:forEach>

Keith

---------- Original Message -----------
From: Hassan Schroeder <[EMAIL PROTECTED]>
To: Tag Libraries Users List <[EMAIL PROTECTED]>
Sent: Tue, 30 Mar 2004 13:57:17 -0800
Subject: Re: Formatted date not returning

> Keith wrote:
> > 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">
> >     SELECT
> >          TO_CHAR(dob, 'DD-MON-YYYY')
>               TO_CHAR(dob, 'DD-MON-YYY') AS thisDOB
> >     FROM ccevs_resource_registry
> > </sql:query>
>
> ..and then call it as
>
> >   <c:forEach items="${resource_list.rows}" var="resource_row">
> >             <c:out value="${resource_row.dob}" />
>                  <c:out value="${resource_row.thisDOB}" />
>
> 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]
------- End of Original Message -------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to