Jun-13-2021, 09:41 AM
Hello ,
I think I'm missing something
I have a string and I want to make it a datetime object
I have found this
when I remove the "import datetime" I get this error
Thanks ,
I think I'm missing something
I have a string and I want to make it a datetime object
I have found this
StartDate = datetime.strptime(StartDate, '%d/%m/%Y-%H:%M:%S')then I want to add to it 5 min
EndDate = StartDate + datetime.timedelta(minutes=5)I'm using
from datetime import datetime import datetimebut I get an error of :
AttributeError: module 'datetime' has no attribute 'strptime'how can it be ?
when I remove the "import datetime" I get this error
AttributeError: type object 'datetime.datetime' has no attribute 'timedelta'so what am I missing?
Thanks ,