Android examples for java.util:Calendar Format
calendar Long String as yyyy-MM-dd HH:mm:00 format
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String calendar2LongString(Calendar calendar) { SimpleDateFormat format = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00"); return format.format(calendar.getTime()); }// w ww .ja va 2 s .c om }