2 months ago

change date time format

Posted 2 months ago by Apex

I am trying to fetch max(modified_date) whose dtype is datetime in mysql and then storing it in a cursor. When I try to fetch the response, it returns : [(datetime.datetime(2019, 9, 13, 9, 31, 5),)]

I am not able to change it into date time format as it is in the table from which I am trying to fetch. I want to convert my response in the below format, how should I do that? 2019-09-13-02.32.28 +0530

Please sign in or create an account to participate in this conversation.