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
try this
int year = mDatePicker.getYear();
int month = mDatePicker.getMonth();
int day = mDatePicker.getDayOfMonth();
Calendar calendar = Calendar.getInstance();
calendar.set(year, month, day);
SimpleDateFormat format = new SimpleDateFormat("MM-dd-yyyy");
String strDate = format.format(calendar.getTime());