Hi
I need to compare two dates in java. I am using the code like this:
Date questionDate = question.getStartDate();
Date today = new Date();
if(today.equals(questionDate)){
System.out.println("Both are equals");
}
But this is not working. Results for both Dates are like this:
questionDate
returns like this: 2010-06-30 00:31:40.0
today
returns like this: Wed Jun 30 01:41:25 IST 2010
How to resolve this? Thanks in advance