Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getChangeTimeFormat(Date date) { String str = null; if (date != null && !"".equals(date)) { SimpleDateFormat sd = new SimpleDateFormat("HH:mm"); str = sd.format(date); } return str; } }