Re: How to convert String to Date in EL?

2019-08-23 Thread Kazuaki Miyauchi
2019年8月20日(火) 17:44 Stuart Thiel : > Because formats for dates are so ambiguous, there's no reliable way to > interpret. isn't so ambiguous. Regards, Kazuaki Miyauchi, Japan - To

Re: How to convert String to Date in EL?

2019-08-20 Thread Kazuaki Miyauchi
Excuse me. PC sent my under-writing mail. 2019年8月20日(火) 18:14 Kazuaki Miyauchi : > I think many people use JavaBeans or like that using Date data. > But, in Web site, year, month, day are mostly requested parameters. > It was very convenient I can use ${param.year} and s It was very convenient I

Re: How to convert String to Date in EL?

2019-08-20 Thread Kazuaki Miyauchi
2019年8月20日(火) 17:55 Stuart Thiel : > I suspect you can skip the set tag and wrap the parseDate in the sqlParam > tag as well, but I've never mucked with sql in JSPs (I'm pretty strict > about using them exclusively as Template Views) I think many people use JavaBeans or like that using Date

Re: How to convert String to Date in EL?

2019-08-20 Thread Stuart Thiel
I suspect you can skip the set tag and wrap the parseDate in the sqlParam tag as well, but I've never mucked with sql in JSPs (I'm pretty strict about using them exclusively as Template Views) On Tue, Aug 20, 2019, 05:44 Stuart Thiel wrote: > Because formats for dates are so ambiguous, there's

Re: How to convert String to Date in EL?

2019-08-20 Thread Stuart Thiel
Because formats for dates are so ambiguous, there's no reliable way to interpret. The is why you'd use the parseDate tag, probably inside a set to get a date object that you'd then pass to your dateparam thing. Presumably you could write an el "function" to do that inline if you wanted to out in

Re: How to convert String to Date in EL?

2019-08-20 Thread Kazuaki Miyauchi
2019-08-20 16:39 GMT+09:00, Stuart Thiel : > That's what parseDate does, and why I pointed you at it. I also want to do like int case as following. insert into test values(?,?) But, of course, this makes javax.el.ELException: Cannot convert [2019-8-20] of type [class

Re: How to convert String to Date in EL?

2019-08-20 Thread Stuart Thiel
That's what parseDate does, and why I pointed you at it. On Tue, Aug 20, 2019, 04:15 Kazuaki Miyauchi wrote: > This also works using Java description as following. > > > <% SimpleDateFormat sdFormat = new SimpleDateFormat("/MM/dd"); >Date date =

Re: How to convert String to Date in EL?

2019-08-20 Thread Kazuaki Miyauchi
This also works using Java description as following. <% SimpleDateFormat sdFormat = new SimpleDateFormat("/MM/dd"); Date date = sdFormat.parse(session.getAttribute("date").toString()); session.setAttribute("date_o", date); %> insert into test values(?,?) We need such

Re: How to convert String to Date in EL?

2019-08-19 Thread Stuart Thiel
Nope, its to convert a string to a date. I think BalusC is the answer (ranked 246 or something). While the initial question was not what you were looking for, the reason I suggested you have a read is because you can often learn a lot of other things (in particular what you are looking for), and

Re: How to convert String to Date in EL?

2019-08-18 Thread Kazuaki Miyauchi
Hi, Stuart, Thanks for your quick reply. 2019年8月19日(月) 13:01 Stuart Thiel : > The solution with fmt:parseDate is likely what you want, but read what > they say and perhaps change what you're doing a bit. That is to convert Date type to String. I'd like to know reverse way. Google doesn't hit

Re: How to convert String to Date in EL?

2019-08-18 Thread Stuart Thiel
Hello Kazuaki, A quick google is probably more effective than mailing this list every time: https://stackoverflow.com/questions/6162401/convert-and-format-a-date-in-jsp The solution with fmt:parseDate is likely what you want, but read what they say and perhaps change what you're doing a bit. On