How to convert mySQL time to python time?

383
June 29, 2017, at 05:15 AM

I'm trying to retrieve time variable from mySQL database using python. Below shows the python code I use to retrieve the time variable from mySQL database.

import mysql.connector
import time
import datetime
con = mysql.connector.connect(user='root',password='root',host='localhost',database='RV_Aquarium')
cur = con.cursor()
cur.execute("select Feed_Time from ActuatorsLog  ")
results = cur.fetchall()
delta = results[0]
print delta
cur.close()

I able to retrieve the data but it is in the format as shown below

I want to convert the retrieve data in the format, for example 19:00:00. Can someone help me on how to convert from (datetime.timedelta(0, 68400),) to 19:00:00 format in python?

Below shows my database data ,

Rent Charter Buses Company
READ ALSO
Laravel query Builder with DATE mysql function

Laravel query Builder with DATE mysql function

Hi I have a query in my laravel project which should retrieve dates between rangesMy query is:

452
Best way in Doctrine to load only entities which have attached entities

Best way in Doctrine to load only entities which have attached entities

I have an entity, let's call it Foo and a second one Bar

235