Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String getFormattedDate(Calendar cal) { SimpleDateFormat sdf = new SimpleDateFormat("d MMMM yyyy, h a"); return sdf.format(cal.getTime()); } }