'Error to convert string to date in python
I want to convert string to date using datetime.strptime but it shows error strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format)
I am trying to do this becausa i want to compare a date from twitter API to date from my database
tweetDate = datetime.strptime(tweetArrayData[1].split("l: ")[1],"%Y-%m-%d %H:%M:%S")
tweetArrayData[1].split("l: ")[1] refears to 23/03/2022 16:06:08 but i want to change format to 2022-03-23 16:06:08
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

