Android Date Format currentDateToString(String format)

Here you can find the source of currentDateToString(String format)

Description

current Date To String

Declaration

public static String currentDateToString(String format) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static String currentDateToString(String format) {
        SimpleDateFormat formatter = new SimpleDateFormat(format);
        Date currentDate = new Date(System.currentTimeMillis());
        return formatter.format(currentDate);
    }/* w w  w. ja v a 2s.  c  om*/
}

Related

  1. formatDate(Date date)
  2. now(String dateFormat)
  3. now(String dateFormat)
  4. getLongFriendlyDate(Date dt)
  5. getMainClockString(Date utcDate)
  6. dateToString(Date paramDate, String paramString)
  7. changeDateToFormatString(Date fecha, String pattern)
  8. createName(String format, long dateTaken)
  9. formatDate(Date d)