Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; public class Main { public static String toHHMM(Calendar source) { if (source == null) { return "Can't HH:mm, source null"; } SimpleDateFormat sdf = new SimpleDateFormat("HH:mm", Locale.getDefault()); //SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss", Locale.getDefault()); String strDate = sdf.format(source.getTime()); return strDate; } }