时间格式转换

develop
Angel 11 months ago
parent 576a2ecd95
commit 70fd3b797e

@ -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"));
LocalDate time = LocalDate.parse(timeString, DateTimeFormatter.ofPattern("yyyy-MM-dd 00:00"));
// 将计数字符串转换为 Long
Long count = Long.parseLong(countString);

Loading…
Cancel
Save