MySQL Forums
Forum List  »  Connector/Python

Re: python empty result set
Posted by: Leif Hyrne
Date: October 16, 2019 02:10PM

I have done the reposting of the SQL query and things are now working except I cannot seem to receive a datetime object in my result set. As soon as I try to convert to a string or use a datetime format function, I get an exception.

Tuple of example row returned:
(1, 3.0, 5, 0, 0, 1, 0, 0, 44, 12, 45, 0, 1, datetime.datetime(2019, 10, 2, 10, 35, 55)

Exception is as follows:
after the line tmp = str(timestamp)
Excepion caught: int() argument must be a string, a bytes-like object or a number, not 'datetime.datetime'

Thanks for any help...

Options: ReplyQuote


Subject
Written By
Posted
October 15, 2019 09:52AM
October 15, 2019 11:10AM
Re: python empty result set
October 16, 2019 02:10PM
October 17, 2019 06:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.