我需要解析字符串類型值,它看起來像017-11-18T05:26:01.778 + 0000從python中的字符串解析日期時間778是什麼意思?
datetime_object = datetime.strptime(date_in_string, "%Y-%m-%d %H-%M-%S-%j-%f")
但它給錯誤像
ValueError: time data '2017-11-18T05:26:01.778+0000' does not match format '%Y-%m-%d '
哪裏是我的錯?
的[如何轉換本地時間UTC Python中?(可能的複製https://stackoverflow.com/questions/79797/how-do-i-convert-local-time-to-utc-in-python) – codebender
模式不匹配。 –
我的問題是正確的格式,我找不到我自己 –