tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Thiel <stuart.th...@gmail.com>
Subject Re: How to get short description of interval data by EL?
Date Thu, 04 Sep 2014 08:04:48 GMT
This is more a date-formatting question and less to do with taglibs or el.

You probably want to pull the epoch and then use standard
date-formatting that's readily available, or write a simple formatting
taglib if one doesn't already exist... something like this might help
for the former:
http://stackoverflow.com/questions/341384/how-to-convert-an-interval-like-1-day-013000-into-253000

On Thu, Sep 4, 2014 at 3:32 AM, Kazuaki Miyauchi <miyauchk@gmail.com> wrote:
>  Hi,
>
>  I'm making Web-DB program using JSTL on Tomcat and Postgres.
> In there, I'd like to show interval data using EL. But,
> ${rowSelect.interval} shows following long data.
>
> 0 years 0 mons 0 days 0 hours 13 mins 15.114 secs
>
> interval is data of interval type of Postgres.
>
>  How can I get normal expression such as "0:13:15" using EL?
>
>  Regards,                                                    Kazuaki Miyauchi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: taglibs-user-help@tomcat.apache.org
>



-- 
Stuart Thiel, P. Eng.

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


Mime
View raw message