Date dt = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhhmmss");String data = sdf.format(dt);