i am trying to write a code which compare current system date and month from a date obtained from database.
for example
system date is 6th may 2012
and database date is 6th may 2010
i want to compare only 6th may from both objects.
please help with any example

May 6th, 2012, 11:00 AM

Norm

Re: problem Comparing date and month from dates

Get the day of month and the month from each and compare those.

May 6th, 2012, 11:08 AM

KucerakJM

Re: problem Comparing date and month from dates

Have you actually created new Date objects using the data, or are they only String objects? If they are Date objects then look here:Date (Java 2 Platform SE v1.4.2)
Specifically, the getDate() and getMonth() methods.