django postgres datetime field to python datetime -



django postgres datetime field to python datetime -

i have next model class

class transaction(models.model): quantity = models.integerfield(default=0) sell_time = models.datetimefield()

when fetch "sell_time" model, getting datetime in next format

2014-10-01 08:09:46.251563+00:00

my question is, if not in format like

year-month-day hour:minutes:seconds

how can convert python datetime object like

datetime.datetime(2014, 10, 1, 08, 09, 46, 540535)

many thanks

did print it? if print datetime object, serialized string datetime. can utilize other datetime.

python django postgresql datetime

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -