Try this..
Date dt = new Date(date1);
SimpleDateFormat sdf = new SimpleDateFormat("hh:mm aa");
String time1 = sdf.format(dt);
More Related Contents:
- AutoCompleteTextView backed by CursorLoader
- Display the current time and date in an Android application
- How can I get current date in Android?
- This app won’t run unless you update Google Play Services (via Bazaar)
- Google Sign In error 12500
- Dilemma: when to use Fragments vs Activities:
- How can I disable landscape mode in Android?
- Android Fragment onAttach() deprecated
- “Gradle Version 2.10 is required.” Error
- How to put media controller button on notification bar?
- Spinner does not wrap text — is this an Android bug?
- How to have a transparent ImageButton: Android
- Exception : AAPT2 error: check logs for details
- Android SMS receiver not working [closed]
- Detect touch on bitmap
- How do I get MediaProjectionManager without disturbing the current foreground process, except to ask for permission?
- how to play video from url
- Want to compile native Android binary I can run in terminal on the phone
- setting audio file as Ringtone
- Android: custom separator (or even item) in ListView depening on content of item
- Redirecting audio / creating alternate sound paths in Android
- How to change the text of a CheckBox in listview?
- How to set Spinner default value to null?
- Android emulator not rotating to landscape
- What’s the difference between detaching a Fragment and removing it?
- How to handle app lifecycle with Flutter (on Android and iOS)?
- Saving Serializable Objects List into sharedPreferences
- Android Volley POST string in body
- Facebook API login fails with FB app installed on phone
- BitmapDrawable deprecated alternative