Thanks
I got the date format to work by using parts of your advice, here it is.
public long compareDates(String date1, String date2)
{
SimpleDateFormat sdf = new SimpleDateFormat();
long timeDiff = 0;
try
{
sdf.applyLocalizedPattern("yyyy-MM-dd HH:mm");
Date cal1 = sdf.parse(date1);
sdf.applyLocalizedPattern(CONSTANTS.DATE _FORMAT);
Date cal2 = sdf.parse(date2);
timeDiff = cal2.getTime() - cal1.getTime();
}
catch (ParseException pe)
{
String Message = pe.getMessage();
}
return timeDiff;
} // end of compareDates()
thanks for the help
public long compareDates(String date1, String date2)
{
SimpleDateFormat sdf = new SimpleDateFormat();
long timeDiff = 0;
try
{
sdf.applyLocalizedPattern("yyyy-MM-dd HH:mm");
Date cal1 = sdf.parse(date1);
sdf.applyLocalizedPattern(CONSTANTS.DATE
Date cal2 = sdf.parse(date2);
timeDiff = cal2.getTime() - cal1.getTime();
}
catch (ParseException pe)
{
String Message = pe.getMessage();
}
return timeDiff;
} // end of compareDates()
thanks for the help
