I have a datepicker. My app is pushing a notification. I want to display the date in 01-07-2013 MM-dd-yyyy format. Please check my code below:
//---Button v
A simple way to do this might be to simply collect the data and then use String.format:
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH) + 1;
int day = calendar.get(Calendar.DAY_OF_MONTH);
String dateString = String.format("%02d-%02d-%d", month, day, year);
((TextView) m_view.findViewById(R.id.dob)).setText(dateString);