Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String getPath() { return new SimpleDateFormat("yyyyMMddHHmmss").format(Calendar.getInstance().getTime()).trim() + ".jpg"; } }