问题描述
我想将此时间戳格式$query->whereHas('employees' function ($q) {
$q->where('hours_worked','>',0);
});
转换为“dd/MM/YYYY”
我收到数字格式异常:
2021-04-21T17:00:50
解决方法
LocalDateTime
.parse( "2021-04-21T17:00:50" )
.format(
DateTimeFormatter.ofPattern( "dd/MM/uuuu" )
)
这已被多次提及。所以search to learn more。