tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith" <pdra...@pdragon.net>
Subject RE: Display Taglib & Dates
Date Mon, 16 Aug 2004 17:46:20 GMT
I wasn't formatting anymore. I did not have an "AS column_name" after the TO_CHAR(),
though. That lets it display. Thanks.

Only problem I can see with this, though, is that I now have to explicitly list all the
columns I need from a table if there's a date in it. There are some queries where I need
all columns and do a SELECT *, and this wouldn't be an easy fix for some of them. Still
looking through the taglib documentation. I'm still pretty new to custom tag libraries, so
it's slow going now.

Keith


---------- Original Message -----------
From: David Schwartz <ds@arrayone.com>
To: Tag Libraries Users List <taglibs-user@jakarta.apache.org>
Sent: Mon, 16 Aug 2004 13:35:50 -0400
Subject: RE: Display Taglib & Dates

> Once it's returned from oracle simply display using JSTL. There wont be a need
> to format.
> 
> Quoting Keith <pdragon@pdragon.net>:
> 
> >> That is what the TO_CHAR() function does. Using it results in no output
> >> (empty table
> >> cells) with the display taglib, tho.
> >>
> >> Keith
> >>
> >> ---------- Original Message -----------
> >> From: "Karl Coleman" <kcoleman@commercebenefitsgroup.com>
> >> To: "Tag Libraries Users List" <taglibs-user@jakarta.apache.org>
> >> Sent: Mon, 16 Aug 2004 13:20:06 -0400
> >> Subject: RE: Display Taglib & Dates
> >>
> >> > I know T-SQL on MS SQL Server has functions that allow for date
> >> formatting. Maybe
> >> something similar exists for Oracle.
> >> >
> >> > Karl
> >> >
> >> > -----Original Message-----
> >> > From: Keith [mailto:pdragon@pdragon.net]
> >> > Sent: Monday, August 16, 2004 1:18 PM
> >> > To: Taglibs
> >> > Subject: Display Taglib & Dates
> >> >
> >> > I just got the Display taglib to try and make some of my job a little
> >> easier. Things
> >> > seemed to be going good til I ran across the problem of a date field. I'm
> >> pulling from an
> >> > Oracle database, so the following query:
> >> >
> >> > <sql:query var="projects">
> >> > 	SELECT a.project_id,
> >> > 		a.project_name,
> >> > 		a.kickoff_date
> >> > 	FROM project_main a
> >> > 	ORDER BY project_id DESC
> >> > </sql:query>
> >> >
> >> > returns something like this:
> >> >
> >> > 10016
> >> > Project1234
> >> > 2004-07-15 00:00:00.0
> >> >
> >> > I'd like to format the date field to look like this: 15-Jul-2004
> >> > Before, I just used the <fmt:formatDate> tag, but I'm at a loss for
how to
> >> use it in
> >> > conjuction with the display taglib. I tried using the TO_CHAR function
in
> >> the database
> >> > query to format my date beforehand, but then it doesn't return any date
> >> information at
> >> > all. Any help?
> >> >
> >> > Keith
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> >> > For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> >> ------- End of Original Message -------
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> >>
> >>
> 
> David Schwartz
> Array Software Inc.
> http://www.arrayone.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
------- End of Original Message -------


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message