weixin_67929804 2023-07-30 11:59 采纳率: 55.6%
浏览 110
已结题

关于python的日期问题

执行结果出现这个错误应该怎么解决,虚心向各位请教



```python
ValueError: time data "2022-5-13 0:00" doesn't match format "%Y-%m-%d %H:%M:%S", at position 38015. You might want to try:
    - passing `format` if your strings have a consistent format;
    - passing `format='ISO8601'` if your strings are all ISO8601 but not necessarily in exactly the same format;
    - passing `format='mixed'`, and the format will be inferred for each element individually. You might want to use `dayfirst` alongside this.

```

  • 写回答

2条回答 默认 最新

  • threenewbee 2023-07-30 12:37
    关注

    日期格式不对,先对日期做个转化,比如说结尾加上“:00”

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 8月7日
  • 已采纳回答 7月30日
  • 创建了问题 7月30日