generate Dir Name in yyyyMMW format by Date Time - Android java.io

Android examples for java.io:Directory

Description

generate Dir Name in yyyyMMW format by Date Time

Demo Code

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

public class Main {

  public static String generateDirName() {
    return new SimpleDateFormat("yyyyMMW", Locale.getDefault()).format(new Date());
  }//from  w w  w.  j av a 2  s . c o m

}

Related Tutorials