Skip to content
Advertisement

DateTime format in python from Postgres queries

I have a below result from postgres query performing in python.

(datetime.datetime(2022, 3, 22, 15, 18, 17, 677821, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)),)

How can parse or format so I get date along with time only ?

Advertisement

Answer

Problem is solved by using result[0][0] in pyhton code

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement