Here you can find the source of generateTimeStamp()
public static String generateTimeStamp()
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String generateTimeStamp() { SimpleDateFormat dateFormat = new SimpleDateFormat("yy-MM-dd-HH-mm-ss"); Date date = new Date(); return dateFormat.format(date); }//from ww w . j a va 2 s.c o m }