i have made an application in which i need to perform date conversion in 24 hour format. Here is my code.
GregorianCalendar c = new GregorianCalendar(Locale.
Try this
Long someLongDate = 240000L
// I was working with a Long in my own code.
// I'm sure you can use something like varDate.getLong()
TextView textView = (TextView) view; // your view of interest
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
textView.setText(sdf.format(new Date(someLongDate)));
If it helped - don't forget to check my post as the answer..