| Author |
How to persiste a Date type
|
Natalia Lopez
Ranch Hand
Joined: Feb 17, 2005
Posts: 41
|
|
Hi! I have an Interface where you can choose day, month and year and then I{d like to save that on my class account expiration date where expiration date is a Java.util.Date. Anybody can send me and example. I don't know hoe to convert an string to a Date that can be persisted by hibernate King Regards Naty
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Have a look at java.text.DateFormat. Particularly its parse method.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
miguel lisboa
Ranch Hand
Joined: Feb 08, 2004
Posts: 1281
|
|
i use this utility class: (means Enter String output Date) in my code i define: and in my hbm.xml: hope this helps
|
java amateur
|
 |
Natalia Lopez
Ranch Hand
Joined: Feb 17, 2005
Posts: 41
|
|
Yes It was great! Regards
|
 |
 |
|
|
subject: How to persiste a Date type
|
|
|