Android Date to String Convert getFileName()

Here you can find the source of getFileName()

Description

get File Name in format of "yyyy-MM-dd"

Declaration

public static String getFileName() 

Method Source Code

//package com.java2s;

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

public class Main {
    public static String getFileName() {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        String date = format.format(new Date(System.currentTimeMillis()));
        return date;
    }/*w ww .j  a  va 2 s  . com*/
}

Related

  1. getCurrentDateStrs()
  2. getCurrentTimeStr()
  3. getDateByFormatedString(String date)
  4. getDateTimeString(Date date)
  5. getDateTimeString(Date date, int format, Locale currentLocale)
  6. getFormatString(Date date, String dateFormat)
  7. getHourInFloat(Date date)
  8. getLongDateStr(Date date)
  9. getLongFormat(Date date)