Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { private static String getTImeStamp() { return new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(new Date()); } }