Here you can find the source of calendarToString(Calendar date)
public static String calendarToString(Calendar date)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String calendarToString(Calendar date) { SimpleDateFormat dateformatter = new SimpleDateFormat( "dd/MM/yyyy HH:mm:ss"); return dateformatter.format(date.getTime()); }/*from ww w . j a va 2 s . c om*/ }