Here you can find the source of GetCurrentTime_String()
public static String GetCurrentTime_String()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String GetCurrentTime_String() { SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss"); String curentDateandTime = sdf.format(new Date()); return curentDateandTime; }//from w w w . ja v a 2s . c o m }