Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help on formatting JXDatePicker returned values

843806Mar 20 2008 — edited Mar 26 2008
I'm using a JXDatePicker and i've set the format as;
 DateFormat[] formats = {new SimpleDateFormat("dd-MMM-yyyy")};
        DateFrom.setFormats(formats);
        DateTo.setFormats(formats);
DateFrom and DateTo are the two JXDatePicker objects.

I need dates in the format of dd-MMM-yyyy as the value returned by
 datefrom=DateFrom.getDate().toString();
            dateto=DateTo.getDate().toString();
but the returned value is in the format;

'Thu Mar 20 00:00:00 EAT 2008'

What is the problem?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2008
Added on Mar 20 2008
6 comments
1,054 views