Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; public class Main { public static String generateUniqueID() { Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("ddMMyyyyHHmmss", Locale.US); return sdf.format(cal.getTime()); } }