Here you can find the source of getDateYYMMDD()
public static String getDateYYMMDD()
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**//from w ww.j a v a 2s . c o m * Renvoie la date courante sous le format "yyMMdd" * * @return date au format YYMMDD */ public static String getDateYYMMDD() { SimpleDateFormat formatter = new SimpleDateFormat("yyMMdd"); Date currentTime = new Date(); String date = formatter.format(currentTime); return date; } }