SyntaxFix
Write A Post
Hire A Developer
Questions
You should use datetime.datetime.strptime:
datetime.datetime.strptime
import datetime dt = datetime.datetime.strptime(string_date, fmt)
fmt will need to be the appropriate format for your string. You'll find the reference on how to build your format here.
fmt