Hi. I just recently purchased a JavaBean that is a DatePicker. I have it set up so that when a user picks on a date, it transfers that date to a JTextField. My only issue with this is it transfers the date in this format: Mon May 06 18:42:21 CDT 2002 What is the easiest way to get this into a Date format(mm/dd/yyyy) so I can save it to a SQL table? Right now, to get the value, the getNewValue() method is being used on a PropertyChangeEvent. Can I convert it before it is saved, or do I do it when the date is transferred? FYI: I didn't purchase the source($500 yikes!) for the JavaBean so I don't have that. Thanks for any help!! [ May 06, 2002: Message edited by: Jennifer Sohl ]
Hello. Me again. I think I have a pretty good idea how the SimpleDateFormat class works now. Now I have another issue that I'm not really sure how to approach. I was wondering if someone could give me a hint. Right now I have a JTextField that formats a date like this when it is displayed: Friday May 10, 2002 I want to keep this format for when I am retrieving dates from a table, however, I want the user to be able to key in a date like this: 5/10/02. I can't do that right now, because it won't parse the date if they key it in this way. Does anyone have any bright ideas? Thanks again for your help!