Re: select - format date

2007-02-20 Thread Richard Yee
Don't forget that DateFormat and any of its subclasses (ie SimpleDateFormat) are NOT thread-safe. This means that you can't create a static class instance of a SimpleDateFormat object that can be used by different threads without creating a threading issue. If you need to use a date formatter, chec

Re: select - format date

2007-02-20 Thread Shuai Zheng
You can try this: 1, try to get a SimpleDateFormat instance from action or stack 2, use the OGNL syntax to format it: This works for my case. But I feel maybe it does not work for all the tags. You can try this approach. Regards, Zheng Shuai On 2/20/07, Bruno Melloni < [EMAIL PROTECTED]> w

RE: select - format date

2007-02-20 Thread ros
Found nothing better than: listValue="dateTime.toString().substring(0, 16)+' - '+((sector == null) ? '' : sector +' - ')" Bruno Melloni-2 wrote: > > There probably is a better "struts" way of doing this, but here is one > way that gets the job done: > > - Use a list of string-formatted datetim

RE: select - format date

2007-02-20 Thread Bruno Melloni
There probably is a better "struts" way of doing this, but here is one way that gets the job done: - Use a list of string-formatted datetimes. Format the dates before putting them on the list. - For formatting, review the classes java.util.Date, java.util.Calendar, java.text.DateFormat, java.tex