I have a field in SQL info1[11] it contain the:
DateTime format like this: 2019-01-31 17:30:00
so I wanted to date and time separate so I strip the time like that:
ticket_start_date = str(info1[11])[:10]
output : 2019-01-31
but for the time i am doing this but no luck:
ticket_start_time = str(info1[11][11:])
I'm getting this error:
TypeError: 'datetime.datetime' object is not subscriptable
Is there any other way to get the time only in this format. The convention to write time is 'hh:mm:ss AM/PM' or 'hh:mm:ss'
I am selenium and SQL with python to automate some task