Android Calendar Format getAsString(Calendar date)

Here you can find the source of getAsString(Calendar date)

Description

get As String

Declaration

public static String getAsString(Calendar date) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {
    private static SimpleDateFormat df = new SimpleDateFormat(
            "dd-MM-yyyy HH:mm");

    public static String getAsString(Calendar date) {
        return df.format(date.getTime());
    }//from   ww  w .ja va 2  s  .  c o m
}

Related

  1. getCalendarFromDateString(String dateString, String format, Locale locale)
  2. getFormatedDate(Calendar c, String format)
  3. string2calendar(String s, String formatString)
  4. toSimpleDate(Calendar calendar, String format)
  5. getCurrentDateString(String dateFormat)
  6. formatCalendar(Calendar calendar)
  7. formatCalendar(Calendar calendar, String pattern)
  8. formatDateTime(Calendar dateTime)
  9. getLongFriendlyDate(Calendar cal)