How to compare web service date to calendar date in Android?
My web service response comes in this format: 19/2/2011
. I want to compare this web service date to my own calendar date.
Is there any answer and how to highligh开发者_StackOverflow社区t that date?
final Thread t = new Thread(new Runnable() {
@Override
public void run() {
parseData();
}
});
t.start();
Thread t1 = new Thread(new Runnable() {
@Override
public void run() {
try {
t.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
//Split strings here and check them
}
});
t1.start();
If you have both the date in strings you can break it up into day, time , year token and then can compare the strings....this will be a easy and raw approach to do this
精彩评论