Android Date to String Convert formatDate(String format, Date date)

Here you can find the source of formatDate(String format, Date date)

Description

format Date

Declaration

public static String formatDate(String format, Date date) 

Method Source Code

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import com.jstakun.gms.android.config.ConfigurationManager;

public class Main{
    public static String formatDate(String format, Date date) {
        return new SimpleDateFormat(format, ConfigurationManager
                .getInstance().getCurrentLocale()).format(date);
    }//from   w w  w .  ja v a2 s.  c om
}

Related

  1. convertToDateStamp(Date date)
  2. dateTimeToString(Date date)
  3. dateToIsoDateString(@NotNull Date date)
  4. dateToIsoDateString(@Nullable Date date, @NotNull DateFallback fallback)
  5. formatDate(Date date, String format)
  6. formatDate(final Date date)
  7. getCurrentDateStr()
  8. getCurrentDateStrs()
  9. getCurrentTimeStr()