1

I am reading a date column in a postgresql DB. I would like to convert it from below reading into YYYY-MM-DD (this is how it is entered into the DB originally). What is the best approach to do this?

Code:

dataReading = cursor.fetchall()
print(dataReading[1])

Output:

(datetime.date(2016, 1, 5),)
Martik
  • 388
  • 4
  • 20

0 Answers0