cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e.@waterfall.freeserve.co.uk (Ed Ward)
Subject Re: How to do formatting of dates and times with SQLProcessor
Date Fri, 03 Dec 1999 12:53:11 GMT
On Fri, 3 Dec 1999 00:31:58 -0500 (EST), you wrote:

>Hi guys. I'm trying to figure out how to configure SQLProcessor to format
>dates and times nicely. The naive approach would be something like this:
>
><query date-format="yyyy-MM-dd" time-format="hh:mm:ss"
>timestamp-format="yyyy-MM-dd hh:mm:ss">
>
>but suppose you have more than one date column and you want to specify
>different formats for the different columns? One of my local users
>suggested this:
>
><query>
> <date-format>yyyy-MM-dd</date-format>
> <date-format column="other_column_name">MMM d, yyyy</date-format>
></query>
>
>which might work, but it's a break from the tradition of putting all
>resultset configuration options in the query element. It does, however,
>greatly simplify setting column-specific options. Does anyone have either
>an argument to make for one of these options or an alternate suggestion?
>
>- donald
>

How about :

<query>
	<column name="date1" format-type="date" format="yyyy-MM-dd">
</query>


It still doesn't solve your problem of breaking from the tradition of keeping
all the configuration options in the query element, but its not so tied to the
problem of formatting dates.

ed.

Mime
View raw message