ValueError:('未转换的数据仍然:.627867'

时间:2020-01-08 13:38:35

标签: python datetime

我尝试执行以下代码

date1 = datetime.strptime(str(dataMin), '%Y-%m-%d %H:%M:%S')

date2 = datetime.strptime(str(dataAtual), '%Y-%m-%d %H:%M:%S')

r = relativedelta.relativedelta(date2, date1)

问题在于dataMin的值为Timestamp('2019-05-03 00:00:00'),而dataAtual的值为datetime.datetime(2020, 1, 8, 8, 51, 16, 627867)

然后我收到此错误

ValueError: ('unconverted data remains: .627867', 'occurred at index (BTRBZZ00, BT#R0010, Q, E1)')

0 个答案:

没有答案