Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Is there a generic way to parse any type of String into a date? Using the SimpleDateFormat technique you'd have to use try/catch's to accept different formats. Thanks for your help.
> You define a Simple date format object in the same format: > Have a look at the API for all of the masks you can set up for a SimpleDateFormat. > Then, to parse your string into a date object, do the following: > Date myDate = null; > Hope this helps, > Regards, > Jody
Replies: |
Sponsored Links
|