I am getting the current date (in format 12/31/1999 i.e. mm/dd/yyyy) as using the below code:
Textview txtViewData;
txtViewDate.setText(\"Today is \" +
Most of the answers were good and right for your problem of
so i want to find the difference between date in number of days, how do i find difference in days?
I suggest this very simple and straightforward approach that is guaranteed to give you the correct difference in any time zone:
int difference=
((int)((startDate.getTime()/(24*60*60*1000))
-(int)(endDate.getTime()/(24*60*60*1000))));
And that's it!