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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -