Java tutorial
//package com.java2s; //License from project: LGPL import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String getCurrentDate() { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); Calendar currentDate = Calendar.getInstance(); return dateFormat.format(currentDate.getTime()); } }