Friday, October 21, 2011

Re: [android-developers] Re: Date issue

you can try this . It will work.

fd = (EditText) findViewById(R.id.from_date);
td = (EditText) findViewById(R.id.to_date);
int MILLIS_IN_DAY = 1000 * 60 * 60 * 24;
Date date = new Date();
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
String frommdate = dateFormat.format(date.getTime());
String nextDate = dateFormat.format(date.getTime() - 7
* (MILLIS_IN_DAY));
fd.setText(nextDate);
td.setText(frommdate);

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate