Try this:
DatePicker datePicker = (DatePicker) findViewById(R.id.datePicker1);
int day = datePicker.getDayOfMonth();
int month = datePicker.getMonth() + 1;
int year = datePicker.getYear();
More Related Contents:
- Jelly Bean DatePickerDialog — is there a way to cancel?
- Datepicker dialog without calendar visualization in lollipop [spinner mode]?
- DatePicker shows wrong value of month
- Multiple DatePickers in same activity
- Get date from datepicker using dialogfragment
- How to Disable future dates in Android date picker
- Set language to French in android DatePickerDialog
- Android: How to change the DatePicker view date format from MM/dd/yyyy to dd/MM/yyyy?
- How to change the default color of DatePicker and TimePicker dialog in Android?
- How do I detect a cancel click of the datepicker dialog?
- Disable specific dates of day in Android date picker
- Android Material Design Datepicker with AppCompat
- Hide Year field in Android DatePicker?
- Android Material Design Inline Datepicker issue
- Android HashMap in Bundle?
- How to add button to notifications in android?
- how to build an APK and separate libraries that the app loads dynamically
- Adding a Google +1 button in Android App
- Android ListView add items to top without list view scroll [duplicate]
- Is there a faster way to decode html characters to a string than Html.fromHtml()?
- Pop up window to display some stuff in a fragment
- Get number of unread sms
- Android SQLiteOpenHelper cannot open database file
- Calling barcode scanner on a button click in android application
- How to set both gravity and layout gravity of a LinearLayout programatically
- When should I use Android Jetpack Compose Surface composable?
- Is GCM (now FCM) free for any limit? [closed]
- Can’t resolve Android databinding class
- How to disable font scaling in React Native for IOS And Android app?
- Admob shows Test ads but not real ads