This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have retrieved date in web page(say A.jsp) via util date object,now i had retrieved same date on other web page(B.jsp) via request.getParameter(),,,now i want to store that date in database,problem is that request.getParameter() gives string and in Database i have date DataType ,,so how to convert string date to sql date in JSP specially,, and after storing date :
I want to add fuel for a particular bus from UserDefined Date to UserDefined date....
I know this query:-select SUM(fuel) from fuel group by busno.
i dont know how to integrate between clause with it..... please help..i have to submit my project,,,asap....
Thanks Jeetendra Ahuja
Let me say first, doing this type of logic in a JSP violates many best practices.
What is sounds like your looking for is object serialization. Deflating an object (this case a java.util.Date), passing the string to another module, then re-inflating to the Object.
Now, implementing full-blown object serialization might be overkill for what you are wanting to accomplish, So IMO, I would use the java.text.SimpleDateFormat library to convert your date object to a string, then use the same library to get your java.util.Date object back.