Date currentTime = new Date(); SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss"); String date = formatter.format(currentTime); System.out.println(date);
时间: 2024-10-09 00:11:46
Date currentTime = new Date(); SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss"); String date = formatter.format(currentTime); System.out.println(date);