时间格式转换---02

develop
Angel 11 months ago
parent 70fd3b797e
commit 4a0c535f79

@ -40,7 +40,7 @@ public class PeopleVehicleHourFlowController extends BaseController {
String countString = flow.getStatisticCount();
String timeString = flow.getStatisticTime();
// 将时间字符串转换为 LocalDate
LocalDate time = LocalDate.parse(timeString, DateTimeFormatter.ofPattern("yyyy-MM-dd 00:00"));
LocalDate time = LocalDate.parse(timeString, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
// 将计数字符串转换为 Long
Long count = Long.parseLong(countString);

Loading…
Cancel
Save