简体   繁体   中英

ValueError: time data on Python

Good morning. Recently I started to develop an application using QT. But I had some trouble with it. In fact, there is a very strange error with time data, and it only comes up if I try to execute it with the GUI, not via CLI.

This is the error:

ValueError: time data 'Wed Nov  4 09:10:14 2020' does not match format '%a %b %d %H:%M:%S %Y'

I probably need more information like how you actually wrote the code.

The brief idea is :

'09/11/2020 12:39:20' matches with '%m/%d/%Y %H:%M:%S'

'Wed Nov 4 09:10:14 2020' matches with '%a %b %d %H:%M:%S %Y'

or you can also try DATETIMEPARSE([Subscription End],'%b %d %Y')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM