Skip to Main Content

Java Programming

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!

Use of java.uti.Date for comparison

807605Jun 13 2007 — edited Jun 13 2007
Hi Friends

I am stuck in a problem for which i need help from you.

I have written code to convert a date object into a calander object for a functionality in my application.

I am getting the output in the following format after conversion
Thu May 31 00:00:00 IST 2007
Wed Jun 13 00:00:00 IST 2007


Now inside other method i reconvert the calendar object back to Date objects.the code is as below.
Date start=filterStartDate.getTime();
Date end=filterEndDate.getTime();

Now i need to compare the 2 Date objects here and check whether the startdate is less than enddate.
the date objects are again in the same format after conversion
Thu May 31 00:00:00 IST 2007
Wed Jun 13 00:00:00 IST 2007

Can anybody let me know how to do this conversion.If possible provide me piece of code to do it.
waiting for a positive reply from you side.

Regards
Vikeng
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 11 2007
Added on Jun 13 2007
1 comment
124 views