|
You may look at java.text.SimpleDateFormat
Lim Hock-Chai wrote:
I posted below to java101 group and got no respond. Thought I try it here.
I've a jsp that contains a text input field that represent a date. This date is map to a Date field in a table.
I'm using Struts to control the application flow. When user press submit, the ActionForm takes over and basically call the Validate Action class and Form Action that uses beancopy to copy data to a DAO class. In this DAO class, I declare the date field as sql.Date.
Can somebody show me how should I handle the following:
1) In the Validation action, I need to check the input Date field (String class) to make sure that it is greater than today's date. How should I do this?
2) In the bean copy or my DAO, how should I convert this String to sql.Date?
Thanks.
-- ----------------------------------------------------------------------------- *** This messages was scanned for malicious contents *** ----------------------------------------------------------------------------- Franco Biaggi CH-6807 Taverne
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.