I have multiple contacts with birth dates and all are synced with the mobile device. Now the problem is all contacts have different birthday formats and I want to display al
Simply using SimpleDateFormat class. Something like:
Date d = Calendar.getInstance().getTime(); // Current time
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); // Set your date format
String currentData = sdf.format(d); // Get Date String according to date format
Here you can see details and all supported format:
http://developer.android.com/reference/java/text/SimpleDateFormat.html