Java Calendar to String calendar2string(Calendar calendar, String formatString)

Here you can find the source of calendar2string(Calendar calendar, String formatString)

Description

calendarstring

License

Apache License

Declaration

public static String calendar2string(Calendar calendar, String formatString) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

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

public class Main {

    public static String calendar2string(Calendar calendar, String formatString) {
        return new SimpleDateFormat(formatString).format(calendar.getTime());
        // http://www.javaroad.jp/java_date3.htm
    }// ww w.j  a v a  2  s.c  o  m
}

Related

  1. calendarDateToStrFormatddMMMyy(final Calendar cal)
  2. calendarOutput(Calendar date)
  3. calendarParaString(Calendar cal)
  4. calendarToIso(Calendar c)