0

I am using the example from the documentation.

From the method

public void onDateSet(DatePicker view, int year, int month, int day) {
    // Do something with the date chosen by the user
}

I want the string "Mon, Sep 14, 2014". How do I get it? Ideally I really want "Mon, Sep 14, 2014 10:30PM" but I can't find a combined date and time picker.

mmBs
  • 8,421
  • 6
  • 38
  • 46
Cote Mounyo
  • 13,817
  • 23
  • 66
  • 87

2 Answers2

1

Here ya go date time combined.

This is no meant to be mean just that you said you were having trouble finding one.

how to find it : http://bit.ly/1doSxEf

Which one I use:

https://github.com/bendemboski/DateSlider

Rick
  • 1,153
  • 1
  • 18
  • 37
0
// try this way 
public void onDateSet(DatePicker view, int year,int monthOfYear, int dayOfMonth) {
 Time chosenDate = new Time();
 chosenDate.set(dayOfMonth, monthOfYear, year);
 long dt = chosenDate.toMillis(true);
 CharSequence strDate = DateFormat.format("KKK MMM dd,yyyy", dt);
 // mow use  strDate..
}
Haresh Chhelana
  • 24,720
  • 5
  • 57
  • 67