views:

76

answers:

1

Hi,

I have an String array of dates in the format ex:'2010-05-04 11:26:46 +0530'. How can I check whether a particular date in the array is > today?

thanks

+7  A: 
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");

df.parse(datearray[i]).after(new Date()) 
Daniel
I have to admit, that this matches only dates > now(), not dates > today(), but this should not be too hard to accomplish.
Daniel