ValueError: time data 'In 00 days 23:07:56' does not match format 'In %d days %H:%M:%S'
问题 I am trying to parse my date string with time library. But i have an error in parsing. # Example is 'In 0 days 23:07:56' client['license_time_start'] = time.strptime('In 0 days 23:07:56', 'In %d days %H:%M:%S') ValueError: time data 'In 00 days 23:07:56' does not match format 'In %d days %H:%M:%S' 回答1: The error is because date can't be 0 . It has to be an positive integer. Therefore, this produces an error:- time.strptime('In 0 days 23:07:56', 'In %d days %H:%M:%S') # ValueError: time data