Here you can find the source of currentDateString()
public static String currentDateString()
//package com.java2s; //License from project: Apache License import java.text.*; import java.util.*; public class Main { public static final SimpleDateFormat DEFAULT_DATE_FORMAT = new SimpleDateFormat("MM/dd/yy"); public static String currentDateString() { Date now = new Date(); return (DEFAULT_DATE_FORMAT.format(now)); }//from ww w . j a v a 2 s. c o m }