0%
java 日期操作
1 2 3 4 5 6 7 8
| LocalDateTime today_start = LocalDateTime.of(LocalDate.now(), LocalTime.MIN); LocalDateTime today_start = LocalDateTime.of(LocalDate.now(), LocalTime.MAX); today_start.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
Date out = Date.from(today_start.atZone(ZoneId.systemDefault()).toInstant()); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); sdf.format(out);
|