> Several have asked about using BeanUtils.copyProperties when you are > dealing with Dates. The default copyProperties works fine if you are > uisng java.sql.Date but not if you want to use java.util.Date.
Rick, thanks for posting this! I almost missed it, but caught Max's reply. You say that the default BeanUtils.copyProperties works fie with java.sql.Date, but I find that I still have a problem unless the user types in the date backwards-with-dashes (2002-11-06) the way the java.sql.Date.valueOf() method wants it. And that's a bit much to expect of the users. Then again, I'm using PropertyUtils.copyProperties(), in code I swiped from the struts-example webapp, not BeanUtils. Should I be using BeanUtils instead? So... I still need to have the user type 5/1/2002 or 05/01/2002 [or 5/01/02] or any other valid Month-Day-Year date and have a copyProperties method manage to get it turned into a Date object. I'm using java.sql.Date right now, but it doesn't matter to me. I am investigating the popup javascript calendar that was suggested (thanks!) and also possibly a Singleton class that does nothing but talk to the DBMS and use its native date conversions. (It will take, for example, '5' and turn it into May 1st of the current year-- the users are used to that magically happening.) Any other suggestions are gratefully accepted. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management